Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Jun 18, 2021 7:38 pm

Hello

I have got the excel from ssrs report and before sending it to browser to download , I need to make change to worksheet to apply freezepane for 3 columns in every worksheet.

I have the below code
using (Stream stream = report.render(p1,p2,p3,p4)
Response.Buffer = true;
Response.Clear();
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment; filename=" + p2+ p3);

after this step i have
using (BinaryReader br = new BinaryReader(stream))
{ //code }
response.flush();
response.end();

I had installed spire.xls from nuget and called workbook.loadfromstream(stream) and applied freezepanel(3,1) for one of the worksheet.
after that workbook.savetostream(stream) and continue with using (BinaryReader br = new BinaryReader(stream))

when i open the excel , its corrupted. please let me know how to do this?

ForumHelp
 
Posts: 1
Joined: Fri Jun 18, 2021 7:29 pm

Mon Jun 21, 2021 10:57 am

Hello,

Thank you for your inquiry.
I simulated an excel file to test your case, but did not reproduce your problem. The version I used is the latest Spire.XLS (Spire.XLS Pack Version: 11.6), I recommend you give this version a try. If the problem still exists, please provide your excel file, complete test code for our investigation. You could attach them here or send to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Thu Jun 24, 2021 7:01 am

Hello,

Hope you doing well.
How is your issue going? Has it been resolved? If not, please provide your excel file, complete test code for our investigation. You could attach them here or send to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS