Page 1 of 1

Reading a csv file into a table

Posted: Tue Jul 05, 2011 4:28 am
by atoch
Bonjour,

I have a table of metadata stored in a csv file. I'd like to be able to import it as an Eviews table. Is there a way to achieve that using an eviews program ? It is easy to export an Eviews Table into a text file but import does not seems to exist. May be there is a more appropriate Eviews object to store metadata ?

Thanks

Arnaud Atoch

CSV file content
Variable,Type,Power,Formula_Q,Formula_A,Flag
GDP,GROWTH,9,PGDP*GDPV,convert(averaged),I
CPV,GROWTH,9,ND,convert(averaged),F

Expected result in an Eviews Table
Variable Type Power Formula_Q Formula_A Flag
GDP Growth 9.000000 PGDP*GDPV Convert(averaged) I
CPV Growth 9.000000 ND Convert(averaged) F

Re: Reading a csv file into a table

Posted: Tue Jul 05, 2011 7:51 am
by EViews Gareth
There isn't an easy way to do this. In general, currently, EViews is not great at reading in meta data.

You have two options. You could either read the csv file in as a new page in your workfile, then figure out some way to get the information back to your original page.

Or you could read the csv file in as a text object, then parse the text object to get the metadata.

Re: Reading a csv file into a table

Posted: Thu Jul 24, 2014 7:16 am
by memos
I was looking for an answer to the same question: "how to read text in a csv file into a table?"
However, regarding Gareth's second suggestion, I was not able to figure out how to read a text file into a text object. The text object does not seem to have a "read" procedure. I use Eviews version 8.

Re: Reading a csv file into a table

Posted: Thu Jul 24, 2014 7:56 am
by EViews Gareth
text.append

Re: Reading a csv file into a table

Posted: Thu Jul 24, 2014 8:12 am
by memos
Thanks