Solved

c# export dataset

Posted on 2006-10-27
3
507 Views
Last Modified: 2012-06-21
how do i export dataset to excel?
0
Comment
Question by:bman9111
3 Comments
 
LVL 6

Expert Comment

by:dorothy2
ID: 17821627
Since Excel accepts XML output, I would serialize the dataset using XMLSerializer.
0
 
LVL 8

Author Comment

by:bman9111
ID: 17824165
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
 
LVL 12

Accepted Solution

by:
sumix earned 250 total points
ID: 17824957

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question