When i try to fill an excel template and push it to the browser with an open (in excel) / save dialog and choose open , excel tells me that it cannot find (no more?) the excel file and thus cannot open it.
saving is not any problem.
I use the following line of code and do not wish to save anything to disk before presenting it to the client (if possible).
// open the template and fill in the data ExcelDesigner designer = new ExcelDesigner(); designer.Open(MapPath("export") + "\\templates\\excel\\guestlist\\guestlists.xlt"); designer.SetDataSource(ds); designer.Process();
// push filled in excel to client designer.Save(strFileName, SaveType.OpenInBrowser, FileFormatType.Default, this.Response); // i already tried every method of the SaveType class without any luck :(
If you use OpenInBrowser option, the generated file will be open in the same web browser. If you want to open it in MS Excel, please use OpenInExcel option.