//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); // GcExcel supports open xlsm file workbook.Open(System.IO.Path.Combine(this.CurrentDirectory, "macros.xlsm")); // Macros can be preserved after saving workbook.Save(System.IO.Path.Combine(this.CurrentDirectory, "macros-exported.xlsm"));
' Create a new Workbook Dim workbook As New Workbook 'GcExcel supports open xlsm file workbook.Open(IO.Path.Combine(CurrentDirectory, "macros.xlsm")) 'Macros can be preserved after saving workbook.Save(IO.Path.Combine(CurrentDirectory, "macros-exported.xlsm"))