Sir,
I was trying to implement the functionality mentioned in this URL, http://www.aspsnippets.com/Articles/Export-Windows-Forms-DataGridView-to-Excel-using-C-and-VBNet.aspx, and am able to do that without any issues. The excel able generated successfully.
However, while trying to open the file I am getting an error saying that "Excel cannot open the file "File.xlsx" because the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.". I am using .Net Framework 4.5 and Excel 2013.
Could you please advise me where I am going wrong here?