siddharth rai

siddharth rai

  • NA
  • 10
  • 5.3k

excel report generation error

Jul 5 2013 2:55 AM
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. 

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)

Answers (3)