P
philip herman
Tried everything including allowing full control to ASPNET user to
folder containing workbook but stiil get
'System.Runtime.InteropServices.COMException: Document not saved'
exception. Any ideas?
ApplicationClass excapp = new ApplicationClass();
WorkbookClass wb = null;
string sPath = Request.ApplicationPath + @"\aging.xls";
wb = (WorkbookClass)excapp.Workbooks.Open(Server.MapPath(sPath),
Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);
excapp.Run((object)Convert.ToString("RunReport"),Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,M
ssing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);
wb.Save();
folder containing workbook but stiil get
'System.Runtime.InteropServices.COMException: Document not saved'
exception. Any ideas?
ApplicationClass excapp = new ApplicationClass();
WorkbookClass wb = null;
string sPath = Request.ApplicationPath + @"\aging.xls";
wb = (WorkbookClass)excapp.Workbooks.Open(Server.MapPath(sPath),
Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);
excapp.Run((object)Convert.ToString("RunReport"),Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,M
ssing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);
wb.Save();