Hi,
we are just releasing a version (not POI but the company I work for) so I
can't do it right now but I can explain how I would go about it and maybe
you could have a shot at it yourself.
1) create two xlsx files with identical string data, one with SXSSF the
other with XSSF. Change the suffix of the files to ".xlsx.zip" and unzip
them.
Look at the file "xl/worksheets/sheet1.xml" in both versions and you will
immediately understand the difference. In case of XSSF the integer in the
integer n in the "v" element is an index to nth "t" element in the file
"xl/sharedStrings.xml". Apparently the file is not sorted (I checked).
2) Find an efficient set algorithm for large numbers of entries (perhaps
disk based). You probably want a map because you want to store the order in
which the string were inserted into the map and the produce the file
sharedStrings.xml in that order.
3) Search for "inlineStr" in
/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (line 1530 in
3.8 beta 4) and do the necessary to produce t="s" instead of t="inlineStr".
The right place to to add the creation of the file sharedStrings.xml is in
/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java in the
function SXSSFWorkbook.write() (line 663 in 3.8 beta 4).
Regards,
Alex

3)  good algorithm at least two files differ.  

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/poi-3-8-beta-4-SXSSFWorkbook-xlsx-file-empty-in-Numbers-tp4972454p4977356.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]

Reply via email to