View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default How to import SQL databases automatically / by batch?

There are a few method. The easiest to set up is to perform a query fro the
worksheet menu Data - Import External Data - New Databae Query.

the second metho is to use a macro to open the database a retrieve the data
using SQL. You can actually get the SQL statements by recording a macro when
you do an New Database Query. If you record the macro while performing a New
Database query the Command Text portion of the recorded macro is the SQL
statments.

If yo need help record the macro and post the rrecorded macro for additional
assitance.

"Simon Kwong" wrote:

Hi,

I have 20-30 SQL database files. How can I to import the data into Excel
files automatically or by batch (using macros)?

Thanks
Simon