We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How can i load an .xlsm file

Hello i want to load a macro file i created and add some sheets to it at runtime . the workbook has no password just that it contains some macro.pls help

string wrkpath = Server.MapPath("~/App_Data/PmasterTemplate.xlsm");
Workbook wrk = new Workbook(path);
wrk.FileFormat = FileFormatType.Xlsm;


// Workbook wrkbk = new Workbook();
Workbook wrk2 = (Workbook)x.PmasterOilandGasPIVot(ref MEM, ref msg, this.cboFirstElement.SelectedItem.Text,wrk, this.cboGroup.SelectedValue, true, this.cbostartdate.SelectedItem.ToString(), this.cboenddate.SelectedItem.ToString());
wrk2.Save(this.Response, " Report.xlsx", Aspose.Cells.ContentDisposition.Attachment, new XlsSaveOptions(SaveFormat.Xlsx));

am getting this Error :

This file's format is not supported or you don't specify a correct format.

Hi,


Could you attach the template file here, we need to check or test with the file.

Thank you.