View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Importing from a larger csv

I'd do this:

Start a new workbook
turn on the macro recorder
(tools|macro|record new macro)

Open your csv file
delete the 60 columns you don't want
continue any other formatting you need (headers/filters/page setup/etc)
stop recording the macro

Close the newly opened CSV file.

Add a button from the Forms toolbar to the first sheet of this macro workbook.
Assign the button to the recorded macro.

Save this workbook with a nice name:
ManagementReportDataImporter.xls

Now click that button and see if it does what you want.



CW wrote:

Our main corporate system produces a csv containing approx 80 columns of
data, pretty much everything you would ever want to know about our
transactions.

We need a couple of easy-to-use management reports that would require/be
based on only about 20 of these fields.

We have set this can set up the formats in Excel, no problem. The challenge
lies in filtering the csv data when it is imported into Excel. It is a real
pain to individually select all those 60-odd columns that we do not need, and
strip them out.

Is there any way of automating this, as part of the import (get external
data) process, rather than doing it manually every time we feed Excel with
the updated data?
Many thanks
CW


--

Dave Peterson