how to link ot a data in a csv file?

L

Lamb Chop

I have a csv file that automatically generated (update) every 15 minutes
from a computer server (which I cannot control).

The csv file is only one row and 7 data separated by commas. The filename
and format of this csv file are always the same.

In another workbook, I would like to link a cell to one of the data of the
above csv file.


At the moment, I need to open the csv file manually and then copy the
required data to my spreadsheet.

Is it possible to extract the data from the csv file without opening the csv
file?


Thanks.
 
M

Monkey-See, Monkey-Do

You could write a macro - I don't know if that's something you've done before.

Easier though is to link to the cell in the csv for example have one
spreadsheet with all the analysis functions in or whatever you want... then
set the cells as

=test.csv!$E$1

(you can put the other 6 items in other cells as increments e.g.
=test.csv!$E$2 etc)

then your master spreadsheet will update with the latest value from your
server everytime you open it or calculate a cell (usually automatic or press
F9)
 
D

Dave Peterson

You could open the file as a text file.
Then go to the line that you want.
Parse the data to separate each field that you want.
and then close the file.

But it may be easier just to open the .csv file, copy and paste the info you
need from that new workbook. Then close the .csv file.

If you have to do it lots of times, you could record a macro that does the
work. Drop a button from the Forms toolbar onto a nice spot on the worksheet.
Then assign the recorded macro to that button. And hit the button whenever you
needed to update that data.
 
L

Lamb Chop

Thanks you guys for the prompt reply. I have found a better way to update
the data. Not too sure if you guys find this useful for you in the future.

In the Data menu, Get External Data, Import Text file, I can put the
location of the csv file and decide which column not to import. Before it
finish, click on the Propterties botton, I can ask excel to update its data
every 15 minutes itself. By this way, it solved my problem.
 

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