Here is the code
Response.Clear()
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
'Populate the dataTable/DataSet Here
dgFGI.DataSource = dtDataTable
dgFGI.DataBind()
I used the DataGrid 'cos I needed some nice formatting to be done.
If you need to let the users download the file then add
Response.AddHeader("content-disposition", "attachment; filename=" &
strFileName)
HTH
Trevor Benedict R
MCSD
*** Sent via Devdex
http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!