Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sir,
i am generating the excel report . when ever i m generating that on my localhost then it is generate successfully but when ever i m generating on remote server then a authentication windows appear.
C#
theWorkbook.SaveCopyAs(fileName);
theWorkbook.Close(false, fileName, true);
byte[] data = ExportImportUtil.StreamFile(fileName);
File.Delete(fileName);
return data;
response.ContentType = "application/xls";
response.OutputStream.Write(fileContent, 0, fileContent.Length);
response.AddHeader("content-disposition", "attachment;filename=" + fileName);
Posted
Updated 4-Jul-13 19:43pm
v3
Comments
Raja Soosai 5-Jul-13 3:36am    
is it correct code?

1 solution

Hi Siddharth,

You are using Workbook and all I think that's why you have to give full permission to your published folder.
Check this article its mentioning about generating excel reports using String Writer.
I think it will be helpful
please check it out.
http://androidsharp.blogspot.in/2013/07/generate-excel-report-on-button-click.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900