Bug 50795 - Moving cell comment crashes Excel file
Summary: Moving cell comment crashes Excel file
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.7-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2011-02-16 09:30 UTC by andrei
Modified: 2018-12-07 06:48 UTC (History)
0 users

CellCommentTest.xlsx (11.32 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2011-02-16 09:30 UTC, andrei
CellCommentTest.java (1.14 KB, application/octet-stream)
2011-02-16 09:30 UTC, andrei

Note You need to log in before you can comment on or make changes to this bug.
Description andrei 2011-02-16 09:30:02 UTC
Created attachment 26668 [details]

1. Create Excel file.
2. Add cell comment.
3. Process with POI. Get our created cell comment and try to set to another cell.
  XSSFCell cell = row.getCell(0);
  XSSFComment comment = cell.getCellComment();
  XSSFCell cellWithoutComment = row.getCell(1);
4. Try to save changes
  FileOutputStream out = new FileOutputStream(testFilePath);

Actual result: NPE appears, file size = 0 bytes
Expected: comment moved successfull (in 3.6 it works)

See attachments to test
Comment 1 andrei 2011-02-16 09:30:42 UTC
Created attachment 26669 [details]
Comment 2 Nick Burch 2011-02-18 10:31:05 UTC
Thanks for the test case, it made it much quicker to investigate

I'm rather confused by this one, but it's either a bug in xmlbeans, or we're doing something too odd in our processing of the vml diagram part. However, by adding a .toString() call in after the update, it seems to make xmlbeans re-compute whatever was broken. I'm sure there should be a better solution, but this seems to work fine as a workaround...

Test and workaround added in r1072022.
Comment 3 martin garix 2018-12-07 06:48:56 UTC
How to enter bios windows 10,so don't worry here the all possible solution,now connected this visit then read the more about https://windowsclassroom.com/how-to-enter-bios-windows-10 this is right time,now share this info to all users.