Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32056

Not enough storage exception

$
0
0

Hi,

I am trying to convert XML data to excel file,but i am getting the below exception.

Unable to evaluate the expression. Not enough storage is available to complete this operation. Below is the code i am using.

publicstaticstring GetExcelXml(DataSet dsInput, string filename)

{

var excelTemplate = getWorkbookTemplate();

var worksheets = getWorksheets(dsInput);

var excelXml = string.Format(excelTemplate, worksheets);

return excelXml;

}

publicstaticvoid ToExcel(DataSet dsInput, string filename, HttpResponse response)

{

response.Clear();

var excelXml = GetExcelXml(dsInput, filename);

response.AppendHeader(

"Content-Type", "application/vnd.ms-excel");

response.AppendHeader(

"Content-disposition", "attachment; filename=" + filename);

response.Write(excelXml);

response.Flush();

response.End();

}

Please provide a solution for this...

 

 

 

 

 

 

 

 


 


Viewing all articles
Browse latest Browse all 32056

Trending Articles