Importing and Exporting Data

  • Thread starter Thread starter Josef
  • Start date Start date
J

Josef

hi,

i would like to know how to import/export dat by using vba code, and if
there are any nuances that i may need to consider, such as delimeter
types, with/without headers, etc.

when the data is imported, some will be inserted, whilst other data will
be updated.

thx
 
If you can do imports and exports with the File|Get External Data menu item,
then you can use the same in VBA, look as the TransferText and SaveAsText
items in Help.

These allow you to set up delimiters and headers, and use specifications.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Josef said:
i would like to know how to import/export dat by using vba code, and if
there are any nuances that i may need to consider, such as delimeter
types, with/without headers, etc.

when the data is imported, some will be inserted, whilst other data will
be updated.


General questions like this can not get anything more than a
general answer.

There are many ways to import/export data, for another
Access database you can use SQL statements or the
TransferDatabase method.

For a text file, you can use File I/O statements (Open,
Write, etc) or the TransferText method.

For an Excel spreadsheet, you can use the
TransferSpreadsheet method.

I suggest that you start by checking Help on the appropriate
Transfer... method.
 
If you can do imports and exports with the File|Get External Data menu item,
then you can use the same in VBA, look as the TransferText and SaveAsText
items in Help.

These allow you to set up delimiters and headers, and use specifications.

thanks - i was just after some guidance here. i will look thru help for
some more info.

joe
 
Back
Top