473,703 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting data into Excel

I need to know how to take data from a dataset and write it to an Excel
spreadsheet.
Please, Please , do not send me any MSFT examples. They, for the most
part, are useless
I'm just looking for a little code snippet example

Dec 9 '05 #1
4 1422
JPSutor,

I don't know why you don't want the microsoft examples. They are
actually pretty good in terms of showing you how to create an instance of
the excel sheet, and doing exactly what you want. Once you have the
workbook open, its a matter of just setting the values in the right cells.

Have you checked out http://support.microsoft.com? There are a ton of
HOWTO articles dealing with how to use Excel from C#.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"JPSutor" <jp*****@yahoo. com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
I need to know how to take data from a dataset and write it to an Excel
spreadsheet.
Please, Please , do not send me any MSFT examples. They, for the most
part, are useless
I'm just looking for a little code snippet example

Dec 9 '05 #2
Nicholas,
If you could direct me to one or two examples that show me exactly what
I want to do I'd be greatful. So far I have not found any.

Dec 9 '05 #3
JPSutor,

Knowledge base article 302096, titled "How To Automate Excel with Visual
C# .NET to Fill or to Obtain Data in a Range by Using Arrays", located at
(watch for line wrap):

http://support.microsoft.com/default...b;en-us;302096

While arrays are being used to set the values, you can easily substitute
anything you wish for the array (a data set, perhaps, or some other source
of values).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"JPSutor" <jp*****@yahoo. com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Nicholas,
If you could direct me to one or two examples that show me exactly what
I want to do I'd be greatful. So far I have not found any.

Dec 9 '05 #4
Hi,

Did you at least searched for it?

http://www.google.com/search?hl=en&q=c%23+excel+export

c# excel export , the first page is FULL of examples (and guess what? they
are not from MS :) )
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"JPSutor" <jp*****@yahoo. com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Nicholas,
If you could direct me to one or two examples that show me exactly what
I want to do I'd be greatful. So far I have not found any.

Dec 9 '05 #5

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

Similar topics

9
3696
by: Ksenia Marasanova | last post by:
Hi, I have a little problem with encoding. Was hoping maybe anyone can help me to solve it. There is some amount of data in a database (PG) that must be inserted into Excel sheet and emailed. Nothing special, everything works. Except that non-ascii characters are not displayed properly. The data is stored as XML into a text field. When I use pgsql it's displayed good in the terminal. Now I run my script and print data
4
38513
by: Jean-Marie Delapierre | last post by:
Hi, I have two files in a directory. one called toto.txt with the following content : 1 2 3 4 5
1
1718
by: Antonio. kim | last post by:
Hello~ ^^ I have a question about getting excel data with oledbconnection. I entered '23190000' to Excel Cell and changed Column width to small, then the value chaged to 2E+07 or ####. And I saved this file...(maybe both data saved..viewed data and original data) when openning this file with oledbconnection, I got '2E+07' without original data '23190000'. I'd want to get original data '23190000' instead of viewed data like '2E+07',...
3
9912
by: | last post by:
I wrote a class in VB.NET to export the contents of a datagrid to Excel. It works perfectly on my machine, but it fails on my customers' PCs that have identical versions of Win XP (SP1) and Excel (SP1) installed. The error is: System.Runtime.InteropServices.COMException(0x800A03EC): Exception from HRESULT: 0x800A03EC. at Microsoft.Office.Interop.Excel._Worksheet.Paste(Object Destination, Object Link) at...
6
6369
by: syvman | last post by:
Hi everyone... I am pulling my hair out trying to do this, and was wondering if someone could give me some assistance... I have an Excel spreadsheet containing several worksheets. I'd like to be able to take all of the data from the second column (B) of each worksheet and append that raw data to an access table. The columns in the spreadsheet do not have headers for use as field names (it's my assumption that my table should have a...
2
24707
by: Robert Dyke | last post by:
Hey ... I've got about 500 Excel files with data stored in them in tabular format ... (my coworker used excel as a database). I want to write a vb6 program that will open up these files and get the info from each row, and store it in an MS Access database, or perhaps a comma-delimited file. How can I get into an excel file with VB6? I have VB6 enterprise, and I've installed the "excel" data access components.
3
2224
by: Falcon | last post by:
I'm displaying an Excel spreadsheet using a data gird control in a winform using oleDB objects and so far Data is displaying correctly. I'm having difficulties getting cell style information for each cell in the xls file (Excel spreadsheet) . Does anyone have an idea how to pull that information out from an xls file? Thanks.
2
1928
by: radink | last post by:
I have an established secured access database. I would like to read fields in the Access DB while im in excel via the external database query tools. However im getting an error about not having permission to the db. I enter my crudentials and I still get the error. Any ideas on how to go about this?
1
2144
by: jayafeb83 | last post by:
First I created One excel sheet, 3 rows and 3 columns and I retrieve excel data using ASP, that one I got the Answer I have to know thatretrieve from excel sheet and store the excel data in database using ASP OS:Windows XP Language: ASP
0
1554
by: TG | last post by:
Hi! Once again I have hit a brick wall here. I have a combobox in which the user types the server name and then clicks on button 'CONNECT' to populate the next combobox which contains all the databases in that server. Then after the user selects a database, I have another button that he/she click and I want to retrieve file groups from a specific table. At this point when he/she clicks on that button I get an error:
0
8740
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8657
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9236
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9094
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8988
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5918
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2047
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.