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 2011/02/25 23:04:05 UTC

DO NOT REPLY [Bug 47188] setCellComment corrupts workbook (2007 XML format)

https://issues.apache.org/bugzilla/show_bug.cgi?id=47188

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |LATER

--- Comment #9 from Nick Burch <ni...@alfresco.com> 2011-02-25 17:04:02 EST ---
I believe this is now fixed, please re-open if the problem remains with a
recent svn nightly build / recent release, and include details of how to
replicate the 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


Re: DO NOT REPLY [Bug 47188] setCellComment corrupts workbook (2007 XML format)

Posted by ram_dwivedi <ra...@cisco.com>.
Hello friends,

I was able to overcome of this issue as well. The issue was with my code
itself. In my code, I was suppose to write comments within a for loop and a
condition in that for loop. I was setting anchor before that if condition.
So, if IF condition fails, comment will not get set but anchor is already on
that Drawing, hence the issue.

In .xlsx, you can see the erroneous comment if you open your .xlsx in 7-Zip
or some other zip utility, go to xl folder and open comments1.xml. You'll
find some tag without any comments like <comment ref="B2" authorId="0"/>.
Rest of the comments would be fine. You just remove this, save your xml and
get it zipped back, close your zip utility and open .xlsx. It'll open fine.

Hope this helps someone else!

Thanks,
Ram

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-47188-New-setCellComment-corrupts-workbook-2007-XML-format-tp2331422p4378295.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: DO NOT REPLY [Bug 47188] setCellComment corrupts workbook (2007 XML format)

Posted by ram_dwivedi <ra...@cisco.com>.
Hi, I am having the same problem. I am using POI3.6. I am having our xl
template in a ByteArrayInputStream which takes xl data from DB, does some
processing and populates it with comments. However, 

when we get the .xlsx, below is the error message while opening the file and
all comments wipe off.
"Removed Records: Comments from /xl/comments1.xml part (Comments)"

If we write it to .xls format, message is:
"File Error: Data may have been lost"

however, comments are visible. Any help will be greatly appreciated.
Thanks!!

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-47188-New-setCellComment-corrupts-workbook-2007-XML-format-tp2331422p4377356.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org