title: How to export GridView to excel using OpenXML in c#?
body: <p>I know people asked similar questions already. But the solutions are not what I am looking for. For my case, our GridView holds at least a million of records. In addition, our customer doesn't like the warning message from excel 2007. Because of the warning message, we cannot use the most common way that uses GridView.RenderControl(). So we decided to try OpenXML. But from all the sample codes I have found, to create an excel file using OpenXML, it seems that you have to loop each row&amp;column of the GridView and write to each cell of an excel file. It will take a good amount of time. Does any one know if there is better/faster solution? Also, we cannot use third party DLLs because of security reason. Thanks.</p>