View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Extracting Data from CSV files

If you record the operation of importing the files, you should be able to
modify the code to do what you want. You can make the filename a variable,
then get that value from your cells. You can import the whole files and
delete the columns you don't want or you might be able only import the
single column (I haven't explored that).

--
Regards,
Tom Ogilvy



"hce" wrote in message
...

Hi

is it possible for excel to extract data from different csv files
without opening them (something like the data import function in excel
where data is extracted from the csv file but without opening it) and
combining the data into an excel worksheet?

for eg, i have 3 csv files, a, b & c. I want to extract column b (as
when opened in excel) of csv a, column c of csv b and column d of csv
c. These 3 columns of data should be then extracted into a specified
workbook(where the macro is) and worksheet and column... say worksheet1
and column A.

in addition, the macro should take the specified filelocation, path and
filename from 3 cells in the workbook...

currently, i am using the excel function to import the data which is
working fine but troublesome because i have to change the filename
manually and many times... which is becoming a chore especially when
there's alot of data to extract...

will really appreciate any advice/suggestions...

cheers


--
hce
------------------------------------------------------------------------
hce's Profile:

http://www.excelforum.com/member.php...fo&userid=3518
View this thread: http://www.excelforum.com/showthread...hreadid=263469