473,486 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

exporting to excell

I am simply trying to export back to Excell the table i imported into vb and
modified by changing some entries. My code can display the modified table in
my datagridview2, but always starts debugger when it gets to the
mycommand.update line. es and ds are both of the type dataset. Can anyone
tell me what I am coding incorrectly? thanks.

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnUpdate.Click

ES = New System.Data.DataSet
ES = DS
DataGridView2.DataSource = ES.Tables(0)

MyConnection = New
System.Data.OleDb.OleDbConnection("provider=Micros oft.Jet.OLEDB.4.0; " &
"data source=D:\CoalBed\welllisttest2.xls; " & "Extended Properties=Excel
8.0;")

MyCommand = New System.Data.OleDb.OleDbDataAdapter("insert * into
[Sheet1$]", MyConnection)

MyCommand.Update(ES)

End Sub
--
Kimark
System Architect
Jan 27 '06 #1
0 921

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

Similar topics

1
1880
by: Stewart Graefner | last post by:
I have been unable to locate anywhere the answer to my problem. I would like to be able to download/import a single record. This record is stored in many different related (one to one) tables. I...
2
1362
by: Robert Halstead | last post by:
Hi guys, I have a asp.net web app and it's connecting to an excell 2003 document (in another folder) via OleDataAdapter. Everything works and all, it's just that when I shutdown IE and try to...
0
1094
by: Delforce | last post by:
Hi all, My application allows you to create a new excel file and then double click it in the list view to start it in excell. If the excell file is an existing one then I can start it now...
1
2608
by: mark.heyden | last post by:
Hi Frends, I am facing problems while trying to export data into pipe format. In fact I am fetching records from mysql database and then trying to create a text file ( using pipe as delimeter) ,...
0
744
by: KimarkNat | last post by:
I am simply trying to export back to Excell the table i imported into vb and modified by changing some entries. My code can display the modified table in my datagridview2, but always starts...
4
1683
by: Gregc. | last post by:
Hi I'm trying to download a query into excel and opening it up as a pivot table. Firstly, is this possible? This is my code thus far: Function Export() Dim excel As String excel =...
2
2662
by: glibo | last post by:
I am trying to change the tab name when i open a excell spread sheet on the run time in c#. I changed it in the code: Response.AddHeader("content-disposition","filename=" + sFileName + ".xls");...
2
1343
by: Bram2008 | last post by:
How to use macro in excel? Can i get some code to record excell data to vb? O y, i have project in vb, and i write data in vb, then i transfer it to excell to build chart. This is my code : ...
1
1443
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I m creating a database. The data for database will fetched from an excell sheet. Now how can i read an excell sheet and update my database with that excell sheet. Or I want to show...
0
7105
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,...
0
6967
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
7132
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
7180
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...
0
7341
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
5439
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
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
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
600
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.