@ISIWARE,
Please note, if you save the workbook (which is loaded from the XLS template file) to XLSM file directly, the macro will be available in the resultant XLSM file. However, in your code, if the Workbook was saved as XLSX file first, then in such kind of situation, the macro in the Workbook object will be removed while saving, so later when saving this Workbook object to XLSM file again, there is no macros to be saved, so the functions using the macros cannot work any more in the resultant XLSM file.
In short, this code works fine:
Workbook workbook = new Workbook("e:\\test2\\OriginalDocument.xls");
workbook.Save("e:\\test2\\out12.xlsm", SaveFormat.Xlsm);
but this code does not work, I mean macros are not working anymore in output XLSM:
Workbook workbook = new Workbook("e:\\test2\\OriginalDocument.xls");
workbook.Save("e:\\test2\\out1.xlsx", SaveFormat.Xlsx);
workbook.Save("e:\\test2\\out12.xlsm", SaveFormat.Xlsm);