Hello, Thank You so much for giving this solution - I am not sure I can pass through the first step as when I create xlsx using XSSF - it never finishes the process and JVM goes out of memory since it's long data.
Anyways, for now we are taking our code per granted as it is just Numbers not opening file and most of the clients will be using other Applications. Again, Thanks for you help! On Wed, Nov 9, 2011 at 10:40 AM, Alex Geller [via Apache POI] <[email protected]> wrote: > 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. > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://apache-poi.1045710.n5.nabble.com/poi-3-8-beta-4-SXSSFWorkbook-xlsx-file-empty-in-Numbers-tp4972454p4977356.html > To unsubscribe from poi 3.8 beta 4 SXSSFWorkbook: xlsx file empty in > Numbers, click here. > See how NAML generates this email -- -Dhwani Patel -- View this message in context: http://apache-poi.1045710.n5.nabble.com/poi-3-8-beta-4-SXSSFWorkbook-xlsx-file-empty-in-Numbers-tp4972454p4982058.html Sent from the POI - User mailing list archive at Nabble.com.
