You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Lion Liang <li...@163.com> on 2010/03/10 09:09:05 UTC

Is there a way to get the existing data validations from a spreadsheet?

The method HSSFSheet.addValidationData(HSSFDataValidation dataValidation)
could add user defined validation rules into the spreadsheet. However, is
there a way to get the existing data validations from a sheet/workbook by
the POI functions?

Please help.

Thanks,
Lion
-- 
View this message in context: http://old.nabble.com/Is-there-a-way-to-get-the-existing-data-validations-from-a-spreadsheet--tp27846602p27846602.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Is there a way to get the existing data validations from a spreadsheet?

Posted by MSB <ma...@tiscali.co.uk>.
....and, I forgot to mention that someone asked this same question a while
ago and I gave the same reply; their response was that they would look into
extending the api to include the required functionality. Since then, I have
heard nothing but it may be worthwhile you looking back through a few months
worth of posts to see if you can locate the member and possibly to send them
a private message asking if they have made any progress. Who knows, someone
could be putting the finishing touches to just the sort of functionality you
are looking for.

Sorry to say that old age has had a bad effect on my memory and I cannot
recall who posted the message or even roughly when but it should be easy
enough to scan the posts titles looking for questions concerning data
validations.

Yours

Mark B


Lion Liang wrote:
> 
> The method HSSFSheet.addValidationData(HSSFDataValidation dataValidation)
> could add user defined validation rules into the spreadsheet. However, is
> there a way to get the existing data validations from a sheet/workbook by
> the POI functions?
> 
> Please help.
> 
> Thanks,
> Lion
> 

-- 
View this message in context: http://old.nabble.com/Is-there-a-way-to-get-the-existing-data-validations-from-a-spreadsheet--tp27846602p27860651.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Is there a way to get the existing data validations from a spreadsheet?

Posted by MSB <ma...@tiscali.co.uk>.
Currently, the api does not expose that information but it does read it from
the Excel file as it parses it.

Take a look at these two classes;

http://poi.apache.org/apidocs/org/apache/poi/hssf/record/DVALRecord.html
http://poi.apache.org/apidocs/org/apache/poi/hssf/record/DVRecord.html

I believe that they do contain the information that you are looking for. To
get it however, you will need to modify the api yourself and create the
necessary support to extract the informaion from these data structures. If
you do decide to proceed and to modify the api, the best thing to do is to
join the developers list and start asking questions there about how to
access these data structures. Sorry to say that I cannot offer any help
mtslef as I have not dug around in the internals of the api at all and am
far from being clever enough or a good enough programmer to know where to
start or proceed.

Yours

Mark B

PS. If you do manage to expose this information then I am sure it would be
appreciated if you would consider donating the work.


Lion Liang wrote:
> 
> The method HSSFSheet.addValidationData(HSSFDataValidation dataValidation)
> could add user defined validation rules into the spreadsheet. However, is
> there a way to get the existing data validations from a sheet/workbook by
> the POI functions?
> 
> Please help.
> 
> Thanks,
> Lion
> 

-- 
View this message in context: http://old.nabble.com/Is-there-a-way-to-get-the-existing-data-validations-from-a-spreadsheet--tp27846602p27860139.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org