Export DataTable to Macro Enabled Worksheet
Export DataTable to Macro Enabled Worksheet

Hello,
I was wondering if there is any way to export data from a DataTable to a macro enabled workbook.
At the time of initializing the DataTable in my code, the "extension" property is set to ".xlsm". After exporting the data and attempting to open the file, I get a notification in excel that the file extension or format is not valid.
Is there anything that can be done to adjust the format of the file so the data can be exported to a macro enabled workbook?
This question has an accepted answers - jump to answer
Answers
Likely you will need to use the customize function of the
excelHtml5
button to change the format. You can compare the differences of an XLSX versus an XLSM file by unzipping then and investigating the XML.Another option, which might be easier, is to use SheetJS with a custom button to export to XLSM. According to their supported formats docs they support XLSM. This example from this thread shows a simple example of using SheetJS.
Kevin
Thanks Kevin!
Scott