Importing data from Excel(2000) file/sheet into an Access(2000) ta

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to developing office solutions and developing my first solution with
Excel and Access 2000 and VBA. I need to capture data from existion Excel
files and write them in Access data table. Can someone show me how to do this?
 
I'm also quite new to developing and coding vba in access, but I know that
you can for example use transferspreadsheet. I use it myself, but I am only
importing data from one sheet from an excel file.

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "YourTable",
"C:\...", True

The last true means that I use the first row in excel as my column names in
access, if you don't need to do that you can change it.
 
Thank you. Really appreciate the lead you gave me.

Do you know a way of referring to individual cells without transferring the
total sheet? I have been trying to locate it in MSDN, however, still not
successful. If you could direct me to the subject area in MSDN it would be a
great help.

Thank you again
 
I hope that I could help you more, but I've never imported individual cells
(or a range of cells).
I found this link that explains transferspreadsheet, and if I understand it
correctly, you can define a range that it imports. But how to define the
sheet from which it imports.. I don't know :(

http://msdn2.microsoft.com/en-us/library/bb214134.aspx

I hope that someone else can help you out :)
 
I wrote the reply before going in to MSDN.

I have already found the reference you sent me. However, I greatly
appreciate you taking all the trouble to find it out for me.
I think I can manage from here, with a little bit of manipulation in the
code.
Wish you all the best with your work.
Thank you once again

Regards
Toyfixer
 
Back
Top