Jump to content

File Import


Guest ALCD1

Recommended Posts

Hello everyone,I would like to automatically import some files (*.csv) into an excel sheet.I have 5 csv files (A1.csv,B1.csv,C1.csv,D1.csv,E1.csv) and an excel file (csvs.xls) in the same folder.Presently I import them as follows:(a) I click on cell A1.(:) From the menu, Data -> Import External Data -> Import Data© Select the file.(d) Choose File type as Delimited.(e) Choose Tab & Semicolon as the delimiters.(f) I will then color the rows containing the import (e.g Rows 1 – Rows 99 will be colored red).I will then click on the next blank cell in column A(e.g A100) & repeat steps(a-f) for each csv file)How can I write a macro that can do this?Can anyone help with this?

Link to comment
Share on other sites

I once worked in Inventory Control for a retailer and one of my tasks was to import data into Excel to build reports for the sales staff. This got to be incredibly tedious so I decided to learn about programming - specifically automation.The way I got started was that I would use the Record Macro tool in Excel and record the steps that I took to import (and format) the data. When I was done, I'd stop the macro and edit its code to see if I could glean any information from it. Eventually I was able to tweak the code and have it do different things.I hope this helps!A Google search may provide some help too.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...