3

I have a .xlsm format excel (2013) spreadsheet (containing vba macros) that I wish to convert to .xml (to save in a non-proprietary format in a repository, and to provide version control e.g. automated merging of branches in git).

As explained here and here, .xlsx files are zipped xml, so they can be converted by simply unzipping.

I tried this with a macro-enabled .xlsm file, and I do get an xml structure of the spreadsheet. But I can't find the macros anywhere. Does anyone know where the macros are stored in .xlsm and where to find them in the corresponding unzipped folder.

Community
  • 1
  • 1
dww
  • 30,425
  • 5
  • 68
  • 111
  • 1
    For "version control", I usually just export the VBA modules and then store those text files. Not ideal, but better than nothing. – YowE3K Aug 10 '16 at 21:14

1 Answers1

7

If you unzip the *.xslm you will find a /xl/vbaProject.bin within the ZIP archive. This is the binary file which contains the macros.

Axel Richter
  • 56,077
  • 6
  • 60
  • 87