I have a requirement to export JSON data to XLS predefined template in Node JS. I do not find any good options to export data into XLS. Hence I am first exporting JSON data to XLSM template using CloseXML library. (Invoking C# console app(exe) from Nodejs to do that). It works! Now I want to convert this XLSM document to XLS.
I tried office API as below to 'Save AS' XLSM to XLS in my C# console APP. But it does not work. gives runtime error.
Excel.Application application = new Excel.Application();
Excel.Workbook wb = application.Workbooks.Add("C:\\Temp\\Template1.xlsm");
wb.SaveAs("Igloo_Bulk_Import_Template1.xls",Excel.XlFileFormat.xlExcel8)
Any suggestion?
If not office API then any other better way to achieve XLSM -> XLS.