Skip to content

Multiline cell content is inlined with OdfTableCell.getStringValue() #417

@miraculix0815

Description

@miraculix0815

getStringValue() calls getDisplayText() which in turn uses the OdfWhitespaceProcessor to collect the string parts. But in the process all line breaks will be skipped. The returned string is not the cell content.

multiline.ods

See attached file containing two rows in the first cell.

The following program outputs "first linesecond line":

var ods = OdfSpreadsheetDocument.loadDocument(new File("multiline.ods")); var cell = ods.getSpreadsheetTables().getFirst().getCellByPosition(0, 0); System.out.println(cell.getStringValue());

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