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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to write a batch job not sure how

Status
Not open for further replies.

ggreg

Programmer
Mar 9, 2001
201
US
I need to write a batch job that would import an excel spreadsheet into access table at a certain time each day.

I am not sure how to do this and I can not seem to find information on how to do this can anyone help and with any help at all to get me started?

thanks
 
the easiest way is to create a macro that import the excel file. save it with a name like "ImportExecel"

next create a new text document and add a line like this but changed to your the path and name of your database:
(the /x tells access to run the macro that that follows the x)
(the line below should be all on one line)

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "C:\databases\SalesQuotes - export.mdb" /xImportExecel

rename the text file from .txt to .bat

then create a scheduled task to run the batch file when you want.
 
Or
"C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "C:\databases\SalesQuotes - export.mdb" /xImportExecel

If you have Office 2003. :)

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
wow, Great

Thanks Drctx and Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top