XLSX Sheet direction support

1

Hello

Release notes of 3.7.6 states that xlsx sheet direction is supported, but applying PROPERTY_SHEET_DIRECTION property:

 jasperDesign.setProperty(JRXlsAbstractExporter.PROPERTY_SHEET_DIRECTION, RunDirectionEnum.LTR.name() );

has no effect even for 5.5.

Xls works as expected.

Am I missing something ?

Thanks

Alexander

iamfuric's picture
Joined: Feb 14 2013 - 12:49am
Last seen: 4 years 7 months ago

anyone ?

iamfuric - 5 years 8 months ago

JRXlsAbstractExporter.PROPERTY_SHEET_DIRECTION, "RTL")

this is my problem as well, please answer, cause I want to set and this is not a valid command.

animgr - 5 years 6 months ago
I had to implment this by myself, ovveride JRXslxExporter and XlsxSheetHelper that adds rightToLeft attribute to  sheetView node :
 @Override    public void exportHeader(int rowFreeze, int columnFreeze, JasperPrint jasperPrint) {        boolean isRTL = RunDirectionEnum.RTL.name().equals(JRProperties.getProperty(jasperPrint, JRXlsAbstractExporter.PROPERTY_SHEET_DIRECTION));        write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");        write("<worksheet\n");        write(" xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"\n");        write(" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">\n");
        write("<dimension ref=\"A1\"/><sheetViews><sheetView workbookViewId=\"0\"");        if (isRTL) {            write(" rightToLeft=\"1\"");        }
...

iamfuric - 5 years 6 months ago

0 Answers:

No answers yet
Feedback