poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48803] File error: data may have been lost
Date Fri, 26 Feb 2010 00:34:12 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48803

--- Comment #6 from Michael Zalewski <mzalewsk@us.ibm.com> 2010-02-26 00:34:07 UTC ---
I see one more problem with the shared string table, but I have no idea how it
comes about. In 'gibberish with errors.xls', the shared string table looks like
this:

[SST] strings=97908 unique=4
0: 'gibberish' ref=2365 hash=a3697bb2
1: 'gibberish'5 ref=95543 hash=a3697bb2
EXTSST {strings_per_entry=8, sst_index=[{sst=1964, offset=12, unused=0}]}
[/SST]

The header claims that the table has 4 unique strings, but there are only 2.

In 'gibberish with errors 2.xls', the shared string table looks like this:

[SST] strings=97926 unique=2
0: 'gibberish' ref=97926 hash=a3697bb2
EXTSST {strings_per_entry=8, sst_index=[{sst=2057, offset=12, unused=0}]}
[/SST]

Now the table claims to have 2 unique strings, but there is only 1. It's also
interesting to note: The two files have a different number of strings. In the
first file, the total strings count is 97908, in the second it is 97926. In the
above output fragments, ref= refers to the number of LABELSST cells that refer
to a particular string. These numbers do add up, so POI is probably getting
this number correct. (In the first file, 95543 + 2365 = 97908. In the second,
there is only one SST entry, and it has 97926 cells which reference that
value).

I guess your code must be creating the value 'gibberish' in two different ways.
Perhaps you set one value and then change it? In any event, this is definately
a bug in POI. Probably two bugs

1) POI should not allow a RichText value with only one format run to be put
into the SST as a RichText. Instead, the format should be applied to the entire
cell, and the value should be placed into the SST as simple text.

2) POI appears to be counting the unique strings in the SST incorrectly. It
doesn't usually do this -- there are probably thousands of users who do not
encounter this problem.

-- 
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message