We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Problem with streams

Hi,

I need your good advices :)

Actually, i'd like to see my Pivot Table, created thanks to a Table in a xls file, in a browser. I saw that i have to use the stream but when i use the snippet code u give, i encouter an error :(

Here is my code:

workbook.SaveAs(@"c:\test.xlsx",ExcelSaveType.SaveAsXLS,HttpContext.Current.Response,ExcelDownloadType.Open,ExcelHttpContentType.Excel2007);
MemoryStream stream = new MemoryStream();
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.AddHeader("content-disposition", @"inline; filename=c:\pouetttt.xlsx");
HttpContext.Current.Response.BinaryWrite(stream.ToArray());
HttpContext.Current.Response.End();

The problem is that the execution crash at the line workbook.SaveAs... I have tested all the override of the method SaveAs that use stream but impossible to go further ..

Do you why ?

Thanks a lot!

1 Reply

LR Lokesh R Syncfusion Team June 11, 2010 11:53 AM UTC

Hi Benjamin,

Thank you very much for your interest on Syncfusion products.

We are very sorry for the delay caused in getting back to you. Could you please update us with the code snippet you have tried to create the pivot table and also your current Essential studio version which will be very helpful for finding out the actual cause of the issue.

Please, let us know if you have any queries.

Thanks,
Lokesh.

Loader.
Live Chat Icon For mobile
Up arrow icon