Is this a Winforms app or a Web App? The reason I ask is b/c you can use
Response.Write on the web to export the data in agrid to excel. You have
two other choices. Use COMInterop and write the values out yourself or use
the OleDbDataAdapter.
You can even use a normal StreamWriter object. Write to the file with
tab spacing (Excel will pick this up as columns) and just save the file
with a XLS extension.
However if you need some formatting (some fonts and colors, but no
charts), I will use XMLSS (XML + XSL => XMLSS => StreamWriter), sound tricky
but Excel generates almos the XSL for you (if you are interested on this
choice give me a shout I will try to find the english links about this issue).
Good Luck
Braulio
--
/// ------------------------------
/// Braulio DÃez Colaborador DNM
///
/// http://www.dotnetmania.com
/// My Site (.net Tips): http://www.bdiez.com
/// ------------------------------