Reading CSV tables

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Reading CSV tables

Postby javiersan » Tue Mar 31, 2009 11:54 am

Hi,

I think this question was asked before but I cannot find the answer in the forum or help. Is there a way of reading a csv table into EViews but storing it as a table object in an existing workfile (not as a new workfile)?

Thanks,

Javier

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Reading CSV tables

Postby EViews Gareth » Tue Mar 31, 2009 12:12 pm

Unfortunately not, but I'll ask our Table Monkey to whip something up for EViews 7.
Follow us on Twitter @IHSEViews

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: Reading CSV tables

Postby javiersan » Tue Mar 31, 2009 3:59 pm

This should work, but I don't know how to obtain the number of obervations of an Alpha object (tried @obs and others to no effect).

I have assumed 23 observations:

Code: Select all

'----------------------------------------------------------------------------------------------------------
'Creates a table out of a .csv file
%tabfile="filename.csv"

wfopen %tabfile
group g series*
!c=g.@count
!r=23
table(!r,!c) ch_table

for !j=1 to !c
For !i=1 to !r
%ser="series"
If !j<10 then
%ser="series0"
endif
ch_table(!i,!j)={%ser}{!j}(!i)
next
next
delete series*  g


Regards,

Javier

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Reading CSV tables

Postby EViews Gareth » Tue Mar 31, 2009 4:10 pm

try !r=@obsrange
Follow us on Twitter @IHSEViews

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: Reading CSV tables

Postby javiersan » Tue Mar 31, 2009 4:22 pm

Thanks, that's it.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 26 guests