Jump to content
Changes to the Jaspersoft community edition download ×

Excel macro doesn't work with jasper library


franky4

Recommended Posts

I use an xlsm-file with a macro by following property (added in sourcecode of jrxml).

<property name="net.sf.jasperreports.export.xlsx.macro.template" value="dropdown-macro.xlsm"/>

The file dropdown-macro.xlsm is in the same folder like the jrxml-file.

Exporting the xlsx-file with Jaspersoft Studio (6.2.1) works and the macro is working to (manual execution).

When using our own software with jasper library 6.2.1 (including all maven dependencies), and the dropdown-macro.xlsm

in the same path like the jrxml-file, the xlsx-file is corrupt (0 byte).

When I remove the property the report is working again (without macro).

We use Office 365.

Any ideas how to fix that problmen?

Many thanks,

franky

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I also tried an absolute path:

<property name="net.sf.jasperreports.export.xlsx.macro.template" value="P:projektep564v2InstallationeniCDDataLABS-Q_ORA-42xformulardropdown.xlsm"/>

I get following error:

net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.

JRException: Input stream not found at: P:projektep564v2InstallationeniCDDataLABS-Q_ORA-42xformulardropdown.xlsm.

The path is correct, I checked it.

I now get an xlsx file with content, but I cannot open it. It's still "corrupt": File cannot be opend .. file format or extension invalid.

When I rename it to xlsx2 I can open and repair it. Even the macro is working. But that is just a workaround.

I assume it could be connected with right-problems of inserting/linking the macro in/with the xlsx-file, but even when the xlsm file

is in a trusted folder I have the same problem.

franky

Link to comment
Share on other sites

  • 2 years later...

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...