Jump to content

Jasperreport-Server: Export report that includes an excel-macro


a.schaeferhoff

Recommended Posts

I've added an excelmacro using net.sf.jasperreports.export.xlsx.macro.template to a report.

Running this report in Jaspersoft Studio works fine. The report is generated, can be exported as xlsx, the xslx-file can be opened in excel and the macro can be executed.

Running nearly (path to the macro-file is different) the same report in Jaserreport-Server is not working. The report is generated, can be exported as xlsx, but the xslx-file can not be opened in excel (invalid fileformat or fileextension).

The macro has been "installed" on the Jasperreport-Server as "described" here.

I'm using Jasperreport 6.3.0.

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

The reference to the macro file is set with net.sf.jasperreports.export.xlsx.macro.template and an absoulte path. Because I didn't know how to put the macrofile into the repository (what I prefer) i've choosen this way.

But you gave the hint to check to access rights on the macro file.

We will do this now.

Link to comment
Share on other sites

We checked the rights on the macro-file. From our point of view everything looks ok.

We made a test where we set an invalid filename for the excel macro file. In this case we got the following error message from the jasperreport server:

net.sf.jasperreports.engine.JRException: Input stream not found at: /<deleted>/jasperserver/WEB-INF/macros/template_macros.xlsm.

Running the report with the valid path and filename we got no error from the jasperreport server. But from excel when we try to open the file (format or extension invalid).

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...