https://issues.apache.org/bugzilla/show_bug.cgi?id=50967
Yegor Kozlov <ye...@dinom.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #6 from Yegor Kozlov <ye...@dinom.ru> 2011-03-27 06:34:57 EDT --- Fixed in r1085900, junit added. Strictly speaking, the problematic ExtSST record is not correct. This record stores a set of buckets that are used to perform a quick lookup of a string within the shared string table. According to the Excel spec (section 2.4.107 ExtSST), the number of buckets depends on the number of unique strings in the workbook and defined by the following formula: numBuckets = num_unique_strings mod max(((num_unique_strings / 128) + 1),8) In your file num_unique_strings=12378 and the number of buckets should be numBuckets = 12378 % Math.max(12378 / 128 + 1, 8) = 59 The bucket size is eight bytes and the expected record length is 8 + 2 + 59*8 = 482 bytes. In your file numBuckets=1548 and the record size including the continue remainder is 12394 bytes! Excel 2003 and OpenOffice can read the attached file without any warnings, but on re-save the ExtSST record is truncated to match the formulas above. I fixed POI to behave similarly. Excel2010 can't read such file which seems a regression. Yegor -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org