Automate a import, sort, and export

J

Jeff

Hi,

I tried posting this in the excel discussion group but there wasnt an answer.

I have a macro in excel that reads data from a csv file. The csv file
ranges from 250,000 rows to 3 million rows. It has to be sorted by Col1 and
then Col2. There are 4 columns. I tried writing code to sort this in excel
but that did not work so I wanted to do this in Access basically - (1) import
the csv into access (2) sort the csv (3) export sorted csv

I dont know a lot about access but have narrowed my question down to a few
problems - basically I cant figure out #3

1.) I open access with Shell(....Acess.exe) in excel
2.) I already have the following in access
i. Macro that imports the csv (transfer text)
ii. Macro that Sorts the csv (query)
iii. Macro that exports the csv (transfer text)

3. I cant figure out how to tell access automatically from Excel
i. Where the csv file is located (this would be in the "transfer text" the
macro that imports the csv
ii. Where to export the csv (this would be in the "transfer text"
exporting csv)


I thought of saving a csv file from excel that has the import/export
location, import that into access and then use this?

Thanks forr your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top