Solved

c# export dataset

Posted on 2006-10-27
3
505 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now