Posted: 5/4/2011
I'm trying to export a grid to excel in a "proper" way.I've been using old method of generating a long string containing an HTML table and then sending it to Page.Response, which works good, but not good enough.The problem is with Excel 2007 (possibly also 2003, don't remember now) showing a warning whenever you try to open such file, the warning says:"The file you are trying to open is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file."Of course after clicking 'OK' you may see that the file is ok, but the warning may scare some users off and I was hoping to find some other way of exporting tables to Excel.Does anyone know any good way of doing that?.
Posted: 6/7/2011
Hi Guptesh...
For exporting to excel, I'm using GemBox Spreadhseet.
You can check my blog post here: http://weblogs.asp.net/hajan/archive/2011/01/30/gembox-spreadsheet-programmatically-create-excel-files-on-an-easy-way.aspx
Hope this helps.