Description
This is one followup of issue #1293.
The pure text content of a cell comment is not always completely read by the reader class ZCL_EXCEL_READER_2007
, if the comment contains formatted parts.
Even when respecting the current restriction of the reader that rich text formatting is not supported for comments, we should at least get the complete pure text content of the comment (i.e. the concatenation of all its, possibly differently formatted parts).
For example, consider the following comment:
After reading the Excel with class ZCL_EXCEL_READER_2007
, the get_text( )
method of the comment object in the comments
collection of the worksheet object will yield only the first part of the comment, namely the text Info:
It should give the string Info:\nFür jeden...
Since for achieving this, the parsing of RTF data in the comments part of the Excel file is necessary anyway, I decided to fully implement RTF functionality for comments for reading and writing.
To reproduce the problem:
- Use notes.xlsx
- Run
ZDEMO_EXCEL37
to readnotes.xlsx
and write to a new file. Debug the methodget_text
ofZCL_EXCEL_COMMENT
for the comment of cellA1
to see the problem.