ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extracting Data from CSV files (https://www.excelbanter.com/excel-programming/311442-extracting-data-csv-files.html)

hce[_9_]

Extracting Data from CSV files
 

Hi

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

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

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

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

will really appreciate any advice/suggestions...

cheer

--
hc
-----------------------------------------------------------------------
hce's Profile: http://www.excelforum.com/member.php...nfo&userid=351
View this thread: http://www.excelforum.com/showthread.php?threadid=26346


Tom Ogilvy

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





All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com