cuba-platform / yarg

Yet Another Report Generator - CUBA Platform reporting engine
https://www.cuba-platform.com
Apache License 2.0
248 stars 74 forks source link

Escaping in xlsx reports #123

Open NikitaShchienko opened 4 years ago

NikitaShchienko commented 4 years ago

Environment

Description of the bug or enhancement

Add the ability to escape lines in xlsx reports.

Forum: https://www.cuba-platform.com/discuss/t/reporting-band-inside-band/3008/10

Desire456 commented 3 years ago

Reverted because needs to be discussed. Code to solve the problem:

            CTXstringWhitespace t = ObjectUtils.defaultIfNull(is.getT(), Context.getsmlObjectFactory().createCTXstringWhitespace());
            t.setValue(value);
            t.setSpace("preserve");
            is.setT(t);
            newCell.setIs(is);
            newCell.setV("");
            if (newCell.getT() == STCellType.S || newCell.getT() == STCellType.STR) {
                newCell.setT(STCellType.STR);
                newCell.setT(STCellType.INLINE_STR);
            }