Hi,
This is my first post on these forums and I am very new to c# and .Net, so please be gentle:)
I have an ASP application that is supposed to put data into a workbook and then save it and open it in the browser later on. The program seems to hang on the SaveAs(..) line, it sort of loads and loads and loads and nothing happens. Sometimes it eventually loads the start page of the application (session time out maybe?).
I was thinking that it might be something with permissions, but everything seems to be in place as far as i understand. This used to work 1-2 months ago, but we've recently installed MS Office 2007 on the server (we had 2003 before).
Any kind of ideas are appreciated, since i don't even know what to test anymore. An error message would have made things easier but i don't understand why i don't get one...
This is the code I have:
Thanks in advance!
//Anna
This is my first post on these forums and I am very new to c# and .Net, so please be gentle:)
I have an ASP application that is supposed to put data into a workbook and then save it and open it in the browser later on. The program seems to hang on the SaveAs(..) line, it sort of loads and loads and loads and nothing happens. Sometimes it eventually loads the start page of the application (session time out maybe?).
I was thinking that it might be something with permissions, but everything seems to be in place as far as i understand. This used to work 1-2 months ago, but we've recently installed MS Office 2007 on the server (we had 2003 before).
Any kind of ideas are appreciated, since i don't even know what to test anymore. An error message would have made things easier but i don't understand why i don't get one...
This is the code I have:
Code:
Excel.Application excelApp = new Excel.Application(); excelApp.Visible = false; System.Globalization.CultureInfo oldCI = System.Threading.Thread.CurrentThread.CurrentCulture ; System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); excelApp.DisplayAlerts = false; Excel.Workbook eWorkbook = excelApp.Workbooks.Open(templateFolder+c.prodCode+".xls", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); this.fillTechDetails(eWorkbook, ds, c, templateFolder); this.fillTermsAndConditions(eWorkbook, c); eWorkbook.SaveAs(fileFolder+c.ID+c.revision+".xls", Excel.XlFileFormat.xlWorkbookNormal, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
//Anna
Comment