Solved

vs.2003 and excel

Posted on 2009-07-03
3
170 Views
Last Modified: 2012-05-07
I have a web application I built in 2003 and C# and it works great and all is well. but once and a while I get a request for a dump of all the record in an excel file so the admin can do some quick sorting and other stuff that the application can do.
So I do this manually when requested, but I am wondering because I have never done this before....but is there a way to write in C#, 2003 with framework 1.1 something that would pull all data from a table and write it to an excel file.
If I can automate this, it will make things much easier, but I have never done this before, any examples or experience or feedback on this thought?
0
Comment
Question by:lobos
  • 2
3 Comments
 
LVL 12

Expert Comment

by:topdog770
ID: 24782818
The very simplest approach is to write the table values to XML.  
'Slightly' more complex, you can write the table values out to a comma separate file, dataDump.CSV, that Excel can easily open.
The CSV route is my personal choice for simple, fast ocassional uses.
If you want to go a little more in depth, it's also possible to write xls files as well.
 
 
0
 

Author Comment

by:lobos
ID: 24785113
Thanks for your feedback, could you point me in the direction of some samples, or perhaps you have some sample code?
0
 
LVL 12

Accepted Solution

by:
topdog770 earned 50 total points
ID: 24787687
Sure!
http://support.microsoft.com/default.aspx/kb/302096
 
This posting has the two other links I was going to add PLUS it has sample code used from web
 http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_21699087.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 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

28 Experts available now in Live!

Get 1:1 Help Now