PC Review


Reply
Thread Tools Rate Thread

exporting to excel

 
 
=?Utf-8?B?S2ltYXJrTmF0?=
Guest
Posts: n/a
 
      2nd Feb 2006
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=Microsoft.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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Exporting Word document into excel automatically without opening excel Graham Mayor Microsoft Word Document Management 0 8th Jun 2009 11:04 AM
Error message in Excel after exporting Access query to Excel =?Utf-8?B?Um9taQ==?= Microsoft Excel Misc 0 6th Jun 2005 03:53 PM
Exporting to Excel through VBA (posted to exporting and VBA group) Katrina Microsoft Access VBA Modules 1 5th Feb 2004 12:04 AM
Exporting to Excel through VBA (posted to exporting and VBA group) Katrina Microsoft Access External Data 0 4th Feb 2004 03:34 PM
exporting to excel - excel macro automatically runs after export!!? paul donnelly Microsoft Access Macros 1 19th Nov 2003 03:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:52 PM.