Export Excel to SQL Server

  • Thread starter Thread starter Tom Y
  • Start date Start date
T

Tom Y

Whats the best way to export data from an excel
spreadsheet that contains a Web Query to SQL Server (or
any DB). How can I get the
Web Query to Refresh before the export takes place(DTS or
whatever)

Any help on this would be great
 
Tom Y said:
Whats the best way to export data from an excel
spreadsheet that contains a Web Query to SQL Server (or
any DB). How can I get the
Web Query to Refresh before the export takes place(DTS or
whatever)

Any help on this would be great

My approach would be to set up an Access (.mdb) file containing linked
tables to both the SQL Server table you are targeting as well as the
spreadsheet containing the Web query. You can then define (using Accesss)
an APPEND or UPDATE query that will do what you wish with the SQL server
table.

You can automate with Excel/VBA code by doing a QueryTable.Refresh for the
web query then .Execute your stored APPEND or UPDATE query.
 
Thanks for the help Thomas!

Where would I be doing the QueryTable.Refresh from? Where
would this code be?

Thanks
 
Back
Top