Below is the code that is used to read and save XLSM file:
HttpPostedFile pf = fupUpload.PostedFile;
FileInfo fi = new FileInfo(pf.FileName);
Stream stream = pf.InputStream;
ExcelEngine ee = new ExcelEngine();
IApplication application = ee.Excel;
application.SkipOnSave = SkipExtRecords.None;
application.SkipOnSave = SkipExtRecords.CopySubstreams;
IWorkbook wb = ee.Excel.Workbooks.Open(stream, ExcelOpenType.Automatic);
wb.SaveAs(@"C:\\Testing.xlsm", ExcelSaveType.SaveAsTemplate);
But after save, the new xlsm file will lose the lookup data that exists in the previous xlsm.
I am using the latest Trial Version, 11.3.0.30.
Is there anything that I missed in the code?