Exporter still broken (exportFunction)

Community Driven Extensions Project
User avatar
Melloware
Posts: 618
Joined: 22 Apr 2013, 15:48

26 Oct 2017, 20:07

Try this PFE 6.1.5 Release which is meant to be used with PF 6.1.5 or higher.

viewtopic.php?f=14&t=52458
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.3

User avatar
Melloware
Posts: 618
Joined: 22 Apr 2013, 15:48

26 Oct 2017, 21:10

Are you sure you have your POI version right? I know they changed that font weight bold method but i thought not until POI 3.15 or higher?
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.3

tom_t
Posts: 17
Joined: 01 Apr 2016, 21:36

28 Oct 2017, 17:23

I am now using:

poi-3.17.jar
poi-ooxml-3.1.7.jar
poi-ooxml-schemas-3.1.7.jar
primefaces-extensions-6.1.5,jar

... and I still get this error. I don't get any compile errors, but data exporter blows up. Do I need an earlier version of poi ?

java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Font.setBoldweight(S)V
at org.primefaces.extensions.component.exporter.ExcelExporter.createCustomFonts(ExcelExporter.java:1013)
at org.primefaces.extensions.component.exporter.ExcelExporter.export(ExcelExporter.java:112)
at org.primefaces.extensions.component.exporter.DataExporter.processAction(DataExporter.java:196)

tom_t
Posts: 17
Joined: 01 Apr 2016, 21:36

28 Oct 2017, 17:56

Update: I got this to work.

First, I looked at the Extensions project, and saw that it was using poi 3.1.3. So I rolled back to that version.

Second, I had some code to set the cell type:

XSSFCell cell = ...
cell.setCellType(CellType.NUMERIC)

But CellType was introduced in 3.1.5. I changed this to setCellType(XSSFCell.CELL_TYPE_NUMERIC), and now it works.

User avatar
Melloware
Posts: 618
Joined: 22 Apr 2013, 15:48

30 Oct 2017, 15:49

Based on PF just updating to 3.17 this morning: https://github.com/primefaces/primefaces/issues/2885

I am going to update PFE for POI 3.17 as well for release 6.2.0.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.3

tom_t
Posts: 17
Joined: 01 Apr 2016, 21:36

30 Oct 2017, 19:40

Thanks for being on top of this so quickly! I'll make a note for when 6.2 comes out.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest