Jump to content
We've recently updated our Privacy Statement, available here ×

jamoros

Members
  • Posts

    1
  • Joined

  • Last visited

jamoros's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. We are using Jasper Reports API version 4.7.1 in Java. We are trying to attach a Macro to our report with the XLSM extension, however when opening the file the macro is not executed. This is the following line used to attach the macro to our exporter: exporter.setMacroTemplate(xlsTemplateFilePath)[/code]Edit: I should mention we are using the JRXlsxExporter class, and exporting to .xlsm type. The following is the VB script in the Macro that is attached to our report: Option ExplicitPrivate Sub Workbook_Open()MsgBox "Hello"End Sub[/code]The file opens fine in Excel, and I am able to see the above VB script (ALT + F11), however when I hit on 'Enable Content' after opening the file the Macro code is not ran. In the above case a pop-up window should open with the word "Hello". If we are to attach the code manually in Excel and open the file, it does indeed work, but not when using the Jasper Report API. Any help to get this to work would be greatly appreciated. Please let me know if theres anything else I can add. Thank you!
×
×
  • Create New...