Re: Perculiar problem reading validations from a XLSX exported from Google Sheets

Andreas Reichel <[email protected]>
Newsgroups gmane.comp.jakarta.poi.user
Organization manticore-projects Co. Ltd.
Message-ID <fa1bc7a7f8869aae2da2f30d525de495651fa96a.camel@manticore-projects.com>
On Thu, 2020-09-17 at 16:26 +0100, Stuart Owen wrote:
> original - 
> https://github.com/stuzart/poi-google-export-testcase/blob/master/src/test/resources/original-unpacked/xl/worksheets/sheet1.xml#L17
> 
> exported - 
> https://github.com/stuzart/poi-google-export-testcase/blob/master/src/test/resources/exported-unpacked/xl/worksheets/sheet1.xml#L1003
> 
> resaved - 
> https://github.com/stuzart/poi-google-export-testcase/blob/master/src/test/resources/resaved-unpacked/xl/worksheets/sheet1.xml#L1007

Stuart,

maybe you would like to open a ticket in the POI's bug tracker with
your finding.
In the meantime, you could try to add the missing count="1" attribute
by yourself? For example:


1) unzip the XLSX
2) find the xml node dataValidations, count the child elements and add
the count="..." accordingly
3) zip into the XLSX file again


If your files are small enough, than I would read the complete DOM of
the XML.
If  your files are large, then maybe GREP/SED could be helpful.


Maybe test your/our assumption first with a test case having count="3".
When editing the XML manually and adding the count="..." attribute
helps, it was definitely worth to file a ticket.


Good luck and best regards
Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.