Imports data from Excel or Foxpro

H

hin87_at_yahoo.com

Hi

How can I create VBA codes to imports data from Excel spreadsheetfor
FoxPro dbf files?

I am able to export the data from Table to Excel using:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
dbtable, path

When I trying using this, nothing happen:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, dbtable,
path, True

How can I import data using VBA code? I want to control which columns
goes with which table columns.

Thanks,
H
 
P

Pieter Wijnen

import it into a local (temporary) table
use a query to copy the data to the correct table
(drop the temporary table)

HTH
Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top