Getting error when am export large data to excel

Am using some code to export data from gridview. Suppose if I have small content it export the data perfectly. But the grid have some lage amount of data then it display the below message " exception of type 'system.outofmemoryexception' was thrown.". Please help me to fix this error. am not able to fix this...

This is my partial code :

      Sales_GridView.RenderControl(htw);//Error in this line
      Response.Write(sw.ToString());   
      Response.End();

Answers


The Worksheet size 65,536 rows by 256 columns so check the row while exporting the data into excel


Need Your Help

Why does multiplying a double by -1 not give the negative of the current answer

java double multiplication negative-number

I am trying to multiply a double value by -1 to get the negative value. It continues to give me a positive value