• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 520
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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