Excel action causing error

Hi,

I’m trying to get the Excel option working in my browse screens. I have both LibraOffice and OpenOffice but I’m not sure what is missing. I’m guessing a setting somewhere but I can’t find it in the help.

Does anyone know what to do to get it working?

java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFFont.getBoldweight()S
    at com.haulmont.cuba.gui.export.ExcelAutoColumnSizer.getFontMetrics(ExcelAutoColumnSizer.java:56)
    at com.haulmont.cuba.gui.export.ExcelAutoColumnSizer.notifyCellValue(ExcelAutoColumnSizer.java:102)
    at com.haulmont.cuba.gui.export.ExcelExporter.exportTable(ExcelExporter.java:196)
    at com.haulmont.cuba.gui.components.actions.ExcelAction.export(ExcelAction.java:217)
    at com.haulmont.cuba.gui.components.actions.ExcelAction.actionPerform(ExcelAction.java:179)
    at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:44)
    at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:36)

Hi, it seems that you have added the newest version of POI library. What version of cuba do you use?

Could you print and attach your dependencies here:

> gradlew :app-web:dependencies

Here is the output of the command you asked for.

out.txt (174.7 KB)

If I have the newest version I’m not sure where it would have come from.

As I see poi 3.17 comes from dataimport add-on dependencies:

|    |    +--- de.diedavids.cuba.dataimport:dataimport-global:0.4.0-SNAPSHOT
|    |    |    +--- com.haulmont.cuba:cuba-global:6.8.8 (*)
|    |    |    +--- de.balvi.cuba.declarativecontrollers:declarativecontrollers-global:0.5.0 (*)
|    |    |    +--- org.apache.poi:poi-ooxml:3.17
|    |    |    |    +--- org.apache.poi:poi:3.17

In fact, this problem is already fixed here: https://youtrack.cuba-platform.com/issue/PL-10642

Will try to backport these fixes to 6.8.9 ExcelAction throws exception with POI 3.17 · Issue #869 · cuba-platform/cuba · GitHub

Oh cool. I’m in no great rush but glad to know what the issue is.

Thanks