Solved

vs.2003 and excel

Posted on 2009-07-03
3
173 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
[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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

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