Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript to Export Excel Worksheet to Access Table

Status
Not open for further replies.

dskelley

IS-IT--Management
Joined
Feb 6, 2002
Messages
13
Location
US
I'm looking for a VBScript that exports a specified Excel worksheet, clearing and replacing a table as is (column headings will be identical) in an Access database. I'm not well versed in VBScript, and am hoping someone can provide a template that all I have to is plug file names into (the files will sit local to each other in the same folder). Thanks to anyone who can help.
 
In the Access VBA help file take a look at the TransferSpreadsheet method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Already doing that. I'm looking for a way to automate it without having to open up either application. Thanks for the input, though.
 
automate it without having to open up either application
Are you confident with Recordset ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Not familiar with it. Is that a 3rd party app? THX.
 
I should clarify that importing is currently already being done using a macro as a temporary workaround, and linking is not an option for reasons I won't get into. I specifically need an external, independent VBScript that will transfer a worksheet called Data from the Excel spreadsheet to a table called Data in the Access data by essentially doing what the macro I have set up is doing, clearing everything in the Data table and replacing it with the modified data, keeping the column headings, without having to open up either application. Thanks.
 
linking is not an option for reasons I won't get into
That really help us to help you.
without having to open up either application
One way to investigate may be ADODB

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top