I am using the following save method
myExcel.Save(System.Web.HttpContext.Current.Server.MapPath(".") + @"\docs" + sFileName, Aspose.Excel.SaveType.OpenInExcel, Aspose.Excel.FileFormatType.Default, System.Web.HttpContext.Current.Response);
How come I can not save the file in a different location? As in the current DIR does not have write access.
Also what are the required permissions on the web server side? The reason I ask is because everything works fine for the imports on my dev machine but on production all excel sheets are empty. Even the template headers dont come across or worksheet names.
Could this be caused by a firewall? The files come across at 0bytes. Sometimes they come across larger but if you try and open you get “not enough memory” or “unable to read file” errors. We are using a Cisco PIX Firewall.
Oh the website is also SSL.
I’ve also noticed that the excel docs only come out corrupt when I choose OpenInExcel. If I save to the HD then user clicks on link its fine.
Here is the full code I am using to make .xls
public void ExportToExcel(DataTable dtData, string sStartCell, string sFileName, string sWorkSheetName)
{
Aspose.Excel.Excel myExcel = new Aspose.Excel.Excel();
Aspose.Excel.Worksheet myWorkSheet = myExcel.Worksheets[0];
myWorkSheet.Name = sWorkSheetName;
Aspose.Excel.Cells myCells = myWorkSheet.Cells;
myCells.ImportDataTable(dtData, true, sStartCell);
myExcel.Save(sFileName, Aspose.Excel.SaveType.OpenInExcel, Aspose.Excel.FileFormatType.Default, System.Web.HttpContext.Current.Response);
}