When I apply page formatting and then save the workbook I get the evaluation notice. I have the license file referenced in the page load and get no error when I use the response.writefile method
My code:
Page_Load
Aspose.Cells.GridWeb.License license = new Aspose.Cells.GridWeb.License();
license.SetLicense(“Aspose.Total.lic”);
string filename = System.IO.Path.GetTempPath() + Session.SessionID + “.xls”;
this.GridWeb1.WebWorksheets.SaveToExcelFile(filename);
Workbook workbook = new Workbook(filename);
Aspose.Cells.Worksheet worksheet = workbook.Worksheets[0];
worksheet.PageSetup.Orientation = PageOrientationType.Landscape;
worksheet.PageSetup.BottomMargin = 0.5;
worksheet.PageSetup.FooterMargin = 0.5;
worksheet.PageSetup.HeaderMargin = 0.5;
worksheet.PageSetup.LeftMargin = 0.5;
worksheet.PageSetup.RightMargin = 0.5;
worksheet.PageSetup.TopMargin = 0.5;
workbook.Save(HttpContext.Current.Response, “sheet.xls”, ContentDisposition.Attachment, new XlsSaveOptions(SaveFormat.Excel97To2003));Response.ContentType = “application/vnd.ms-excel”;
Response.AddHeader(“content-disposition”, “attachment; filename=” + excelName + “.xls”);
Response.WriteFile(filename);
Response.End();