I want to save excel file which export data of grid view. I have written code to export gridview data to excel but I don\'t know how to save exported file.
Following
Folowed the link: C# Excel file OLEDB read HTML IMPORT
Use the Extended Properties=\"HTML Import;HDR=No;IMEX=1 the select * from [tablename],
tablename is returned from GetOleDbSchemaTable.
Note: This would not load the normal excel. For that use Extended Properties=\"Excel 8.0;HDR=No;IMEX=1\, where table name will be with $ sign.
Check sample code: Can't read excel file after creating it using File.WriteAllText() function