473,480 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Export DataTable to Excel?

Dear all,

Is there any easy way to export data from DataTable to Excel?

Thanks for any help,

Tedmond
Oct 24 '05 #1
3 34499
CT
You can write the data using the WriteXml method, and then open the xml file
in Excel.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Tedmond" <Te*****@discussions.microsoft.com> wrote in message
news:C6**********************************@microsof t.com...
Dear all,

Is there any easy way to export data from DataTable to Excel?

Thanks for any help,

Tedmond

Oct 24 '05 #2
Thanks CT, but my Excel does not support XML. Is there any other way?

"CT" wrote:
You can write the data using the WriteXml method, and then open the xml file
in Excel.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Tedmond" <Te*****@discussions.microsoft.com> wrote in message
news:C6**********************************@microsof t.com...
Dear all,

Is there any easy way to export data from DataTable to Excel?

Thanks for any help,

Tedmond


Oct 24 '05 #3
CT
Try this, http://www.codeproject.com/aspnet/Ex...assLibrary.asp

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Tedmond" <Te*****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
Thanks CT, but my Excel does not support XML. Is there any other way?

"CT" wrote:
You can write the data using the WriteXml method, and then open the xml
file
in Excel.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"Tedmond" <Te*****@discussions.microsoft.com> wrote in message
news:C6**********************************@microsof t.com...
> Dear all,
>
> Is there any easy way to export data from DataTable to Excel?
>
> Thanks for any help,
>
> Tedmond


Oct 24 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3740
by: Maria L. | last post by:
Hi, I need to export the content of a DataGrid (in Windows application in C#), into an Excel spreadsheet. Anyone knows how to do this? Any code snippets would help! thanks a lot, Maria
8
2826
by: DC Gringo | last post by:
I have a simple button that should open another window and export a datagrid to an Excel file. I'm getting: "Name 'window' is not declared." What do I need to declare or import? <INPUT...
3
8011
by: nologin | last post by:
Is it possible to export data exposed by DataView to Excel file for example ? Seba
6
3704
by: Sridhar | last post by:
Hi, I have to export data inside the datagrid into an excel worksheet. I have to do this on button click event. I am trying to do like this. First get the DataTable from the datagrid and...
3
11669
by: Scott M. Lyon | last post by:
I'm trying to figure out a way to export data (actually the result of a Stored Procedure call from SQL Server) into a specified Excel spreadsheet format. Currently, I have the data read into a...
1
2761
by: cehether | last post by:
Hello everyone. I am trying to export the contents of a DataGrid to MS Excel using VB.NET 2003. I read of a couple different ways of doing that here (though I couldn't tell which version of...
4
9584
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've got a DataSet that I save as XML using the DataSet DataTable's WriteXml method. If I say XmlWriteMode.IgnoreSchema, it shows up great in Excel, but I can not reopen the file in my...
19
11203
by: cj2 | last post by:
#1 Is there a quick way to export a datatable to an excel file? Or delimited file? #2 Where is the appropriate Microsoft monitored group to ask about writing reports in SQL Reporting services...
2
6388
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the...
11
5226
by: Blacky | last post by:
hi, I have a dataTable in Session.On the click of a button in a Modal Dialog window I need to export this dataTable to Excel sheet.How could i do this...?? i tried using a...
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6743
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.