Bug 48106 - Cell Comments not visible using XSSF
Summary: Cell Comments not visible using XSSF
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.5-FINAL
Hardware: PC Windows Vista
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-02 10:47 UTC by Tom
Modified: 2009-11-30 15:17 UTC (History)
1 user (show)



Attachments
Test case taken from Busy Developers Guide and Output XLSX (5.85 KB, application/x-zip-compressed)
2009-11-02 10:47 UTC, Tom
Details
Simple main() that writes/reads a cell comment to/from workbook (1.76 KB, text/plain)
2009-11-03 17:15 UTC, Tom
Details
Workbook made using Poi with Cell Comments (not visible) (3.85 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2009-11-04 10:40 UTC, Tom
Details
Workbook made using Excel with Cell Comments (visible) (8.94 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2009-11-04 10:41 UTC, Tom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom 2009-11-02 10:47:30 UTC
Created attachment 24462 [details]
Test case taken from Busy Developers Guide and Output XLSX

The simple test case from the "Busy Developers Guide" to create Cell Comments
in an XSSF workbook does not work. The comments are not visible in the
resulting XLSX file. 

A comments1.xml file is created but the comments triangle and message box is
not visible when the spreadsheet is opened in Microsoft Excel.
Comment 1 Nick Burch 2009-11-03 15:41:58 UTC
Can POI see the comments?

Try writing the file out, opening it again fresh in poi and see if you can see the comments. That'll help us figure out how far along things go before they break
Comment 2 Tom 2009-11-03 17:15:45 UTC
Created attachment 24470 [details]
Simple main() that writes/reads a cell comment to/from workbook

A very simple test case that writes an XSSFWorkbook with one cell. Comments are added to the one cell and POI can read and cell comments after writing the file to disk. However, comments are not visible using MS Excel.
Comment 3 Tom 2009-11-03 17:17:53 UTC
Yes, POI can see the comments after writing the XSSFWorkbook to disk.
Comment 4 Nick Burch 2009-11-03 17:18:58 UTC
Any chance you could create a similar one cell file in excel, and attach that? That'll make it much quicker for us to spot what we're doing differently!
Comment 5 Tom 2009-11-04 10:40:59 UTC
Created attachment 24473 [details]
Workbook made using Poi with Cell Comments (not visible)
Comment 6 Tom 2009-11-04 10:41:54 UTC
Created attachment 24474 [details]
Workbook made using Excel with Cell Comments (visible)
Comment 7 Tom 2009-11-04 10:50:38 UTC
There are two big differences between the files I just uploaded. The POI generated xlsx file does not contain the Drawing\vmDrawing1.vml or the Themes\theme1.xml files.
Comment 8 Yegor Kozlov 2009-11-30 06:43:25 UTC
fixed in r884918

Missing vmDrawing1.vml was important - this part stores visual properties of
cell comments (background color, position in the sheet, whether the comment is
visible, etc.)

I added support for cell comments to common SS interfaces so that it is
possible to use the same code to generate .xlsx or .xls output, see the updated
Busy Developers Guide. 

Yegor
Comment 9 Tom 2009-11-30 15:17:22 UTC
I got 884918 from SVN and jarred it up and the comments are working. Nice job on making the comment creation more consistent as part of the usermodel interface. Thanks Yegor!