I create a Excel template which include a macro, when I export data to the template, Aspose.cells change marco to worksheet, how can I keep marco no change?
This message was posted using Aspose.Live 2 Forum
I create a Excel template which include a macro, when I export data to the template, Aspose.cells change marco to worksheet, how can I keep marco no change?
No, we won’t change macros. Could you provide a sample file and code to reproduce your problem?
I upload a file, it include macro and worksheet
My code:
Dim license As Aspose.Cells.License = New Aspose.Cells.License
license.SetLicense(LicenseFilePath)
Dim excel As Workbook = New Aspose.Cells.Workbook
Dim Path As String = MapPath(".")
Dim ExcelFile As String = Path + "\\ExportData.xls"
excel.Open(ExcelFile)
Dim sheet As Worksheet = excel.Worksheets(0)
sheet.Name = "Data"
sheet.Cells.ImportDataTable(DataTable, False, 2, 0)
excel.Save("ExportData.xls", Aspose.Cells.SaveType.OpenInExcel, Aspose.Cells.FileFormatType.Default, Me.Response)
My aspose.cells.dll version is 4.2.0.0
Hi,
Please try this fix.
The type of macro is Excel version 4.0 Macro. We have support to save it to the file and not change it.