Solved

c# export dataset

Posted on 2006-10-27
3
510 Views
Last Modified: 2012-06-21
how do i export dataset to excel?
0
Comment
Question by:bman9111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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!

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 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