0

In my iOS application, I want to generate the excel(.xlsm) file. I used the libXl library.(http://www.libxl.com/) This library can support Excel 97 -2003 formats (xls) and Excel 2007-2013 xml formats (xlsx/xlsm) by referencing in the home page. Now my problem is I can export xlsx file fomat but cannot export the xlsm application in my application . Do you know how to do this?

David Rönnqvist
  • 56,267
  • 18
  • 167
  • 205
ammoe
  • 365
  • 5
  • 20

1 Answers1

2

You can't use libXL to create macros, but you can preserve existing macros. I.e. you can take an excel macro-enabled file as a template, read it with libXL, make some modifications and save.

To save .xslm rather than .xslx you only need to give the file a different extension. File format is the same. Excel won't open an .xlsx file if it has embedded macros, but it's only a convention.

Ivan Shagin
  • 423
  • 3
  • 7