Solved

vs.2003 and excel

Posted on 2009-07-03
3
171 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Video Player 11 23
Graphics 2 27
how to check to see if datatable has headers or not 2 25
Getting error in connectionstring with Excel. 30 30
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.
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

813 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

15 Experts available now in Live!

Get 1:1 Help Now