Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 516
  • Last Modified:

c# export dataset

how do i export dataset to excel?
0
bman9111
Asked:
bman9111
1 Solution
 
dorothy2Commented:
Since Excel accepts XML output, I would serialize the dataset using XMLSerializer.
0
 
bman9111Author Commented:
not sure how to do that. When I write the dataset to xml using something like
dataset.writexml("c:\file.xml");

it doesnt come out right.
0
 
sumixCommented:

You have a class here that has a static method 'Export', that you can use to export a dataset to an excel file using OleDb:

https://filedb.experts-exchange.com/incoming/ee-stuff/1251-ExportToExcel.txt

 (rename the file with .cs extension and add it to your project)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now