No, there is no way to do this with HSSF I am afraid as the record that contains the data validation data is not currently exposed.
One thing you may what to take a look at - and this does mean a lot of digging - is whether the data is exposed as an Entry within the documents structure. To test this out, you will need to create a POIFSFileSystem, call the getRoot() method on it to get at the document's DirectoryNode and then call the getEntries() method on this. This returns an Iterator that will allow you to step through the entries to see what they are. Entries may have children which you can then check out to see if any of them hold the data you are after. If they do - and it is a very big if - you may be able to extract the information you need to re-construct the data validation in the new sheet I do not know if this will even work but am sure that HSSF does read the data validation information from workbooks as it preserves it when opening and then re-saving a workbook which contains validations. If you do find the data validation data, why not consider patching the API to expose it and then contributing the work back to the project? I am confident others will find it useful. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Copy-data-validation-from-a-cell-to-another-tp5710380p5710386.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
