Export Datagrid data to Excel?

E

et

How can I export data from a grid into Excel? Or from a datatable?

I don't have a query I am displaying the schema from a database using a
datatable, and now I want to export it to excel:
dtFields = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, New Object()
{Nothing, Nothing, Nothing, Nothing})

dg.DataSource = dtfields

dg.DataBind
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top