XLSX Sheet direction support

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: 8 years 2 months ago

anyone ?

iamfuric - 9 years 3 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 - 9 years 1 month 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 - 9 years 1 month ago

0 Answers:

No answers yet
Feedback
randomness