You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/06/03 15:38:43 UTC
DO NOT REPLY [Bug 47309] New: Number of Cell Comments in a sheet
limited to 65536 with HSSF
https://issues.apache.org/bugzilla/show_bug.cgi?id=47309
Summary: Number of Cell Comments in a sheet limited to 65536
with HSSF
Product: POI
Version: 3.2-FINAL
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: critical
Priority: P1
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: algonquin637@yahoo.de
It seems to me that the number of cell comments that can be added to a
spreadsheet using HSSF without messing up the ordering is limited to 65536
comments.
* Create sheet with comments using HSSFComment
* write sheet to output stream
* read sheet with input stream
-> comments do not appear in correct row/col anymore
NOTE: MS-Excel can read the comments correctly!!
The HSSFCell.findComments() method hashes TextObjectRecords with their Short
datatype IDs, which explains the number limit. Using Integer here (and when
serializing/deserializing) messes up the format so that not even MS-Excel can
read it.
Attachment:
provides JUnit test file that produces a spreadsheet with more than 65536
comments, writes to a file, reads the file in again and compares the order of
comments between the two sheets.
Comments contain just row/col index numbers for comparison with cell content.
--
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
DO NOT REPLY [Bug 47309] Number of Cell Comments in a sheet limited
to 65536 with HSSF
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47309
--- Comment #1 from Ken Adams <al...@yahoo.de> 2009-06-03 06:39:19 PST ---
Created an attachment (id=23748)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23748)
JUnit test case
--
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
DO NOT REPLY [Bug 47309] Number of Cell Comments in a sheet limited
to 65536 with HSSF
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47309
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Yegor Kozlov <ye...@dinom.ru> 2009-06-07 08:25:50 PST ---
Ken,
Thanks for the good bug report, you've done 50 percent of the job to fix the
problem. I committed the fix in r782398 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=782398 ).
ShapeId is unsigned short and matching cells and comments by it works fine only
if the number of comments is less than 65536. The fact that Excel can handle
sheets with greater numbers of comments made me think it uses a different
logic. In fact, Excel uses a simple ordinal relationship: i-th NoteRecord
corresponds to the i-th drawing group containing TextObjectRecord with the
comment's text. This heuristics works fine for any number cell comments.
Regards,
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org