C# Excel 2007-2025 Macro-Enabled Open XML (*.xlsm) SpreadsheetGear API Sample
Excel-Compatible Samples for .NET
Description
SpreadsheetGear supports saving Excel-compatible workbook files to disk by using the
SpreadsheetGear.IWorkbook.SaveAs(string pathToWorkbook, FileFormat fileFormat) method. To save an Excel 2007-2025 Macro-Enabled Open XML (*.xlsx) file, use the SpreadsheetGear.FileFormat.OpenXMLWorkbookMacroEnabled enumeration option, as shown below: