Skip to content

Enabling rich text comments #1294

Open
Open
@rplantiko

Description

@rplantiko

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:

Image

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:

Image

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 read notes.xlsx and write to a new file. Debug the method get_text of ZCL_EXCEL_COMMENT for the comment of cell A1 to see the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions