Hi,
how to write the vb6 code for import data from excel to my database(mdb),im using data control to connect the database in vb6.
(example:vb6 form1, button1 for browse the excel file(xls) and button2 for import excel data to my database file(mdb))
your help is much appreciated,Thank you.
4 Replies - 2336 Views - Last Post: 24 December 2011 - 10:53 AM
#1
how to write the code for import excel data to access database(mdb)?
Posted 23 December 2011 - 05:54 AM
Replies To: how to write the code for import excel data to access database(mdb)?
#2
Re: how to write the code for import excel data to access database(mdb)?
Posted 23 December 2011 - 11:20 AM
There are a couple of ways to go about this -- personally -- to save time and effort I recommend
That would be if you're writing the vb in an access based module (the access vbe) otherwise, you would select the xls as a db and go row by row, you could open it as a program and parse the data or you could open access with controls from vb6, then use something like
That's just my two cents
docmd.transferspreadsheet acimport, , , ,
That would be if you're writing the vb in an access based module (the access vbe) otherwise, you would select the xls as a db and go row by row, you could open it as a program and parse the data or you could open access with controls from vb6, then use something like
dim AccApp as New Access.Application 'Once you've set it all up and put the pointers in the right locations, try AccApp.Docmd.TransferSpreadSheet acimport , , ,
That's just my two cents
#3
Re: how to write the code for import excel data to access database(mdb)?
Posted 23 December 2011 - 05:43 PM
thank for your reply and info,im new in vb6 can you provide me some simple example code for my reference? i want import all excel data to my database access when i click the commandbutton, and another problem my client computer don't have a Microsoft access.
Thank you.
Thank you.
#4
Re: how to write the code for import excel data to access database(mdb)?
Posted 24 December 2011 - 07:40 AM
if yuou use the search bar on top this forum you will get lot of links
#5
Re: how to write the code for import excel data to access database(mdb)?
Posted 24 December 2011 - 10:53 AM
hwkong1688, on 24 December 2011 - 12:43 AM, said:
thank for your reply and info,im new in vb6 can you provide me some simple example code for my reference? i want import all excel data to my database access when i click the commandbutton, and another problem my client computer don't have a Microsoft access.
Thank you.
Thank you.
Um...guyfromri just gave you some "simple example code" for your reference.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|