Import/read excel column as alpha series

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

jsemeano
Posts: 16
Joined: Mon Mar 20, 2017 1:36 am

Import/read excel column as alpha series

Postby jsemeano » Thu Mar 23, 2017 2:04 am

Hello,

I am trying to attach the description and units to a group of series.

I would like to read the names of the series, descriptions and units from an excel file to 3 alpha series in an attribute change (to follow what's described in viewtopic.php?t=4369).

The excel file looks as follows:
A B C
1 ser_1 desc_1 units_1
2 ser_2 desc_2
3 ser_3 desc_3 units_3

I have been trying with the import and read functions but so far haven't managed.

Could you please give me some guidance on how to do the import?

Thank you in advance.

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

Re: Import/read excel column as alpha series

Postby EViews Gareth » Thu Mar 23, 2017 7:53 am

Could you provide the file?
Follow us on Twitter @IHSEViews

jsemeano
Posts: 16
Joined: Mon Mar 20, 2017 1:36 am

Re: Import/read excel column as alpha series

Postby jsemeano » Thu Mar 23, 2017 9:32 am

Yes

Book1.xls
series names and description example
(23.5 KiB) Downloaded 337 times

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

Re: Import/read excel column as alpha series

Postby EViews Gareth » Thu Mar 23, 2017 9:42 am

Assuming your data page is called "Untitled":

Code: Select all

pageload(page=attr) book1.xls colhead=1
pageselect untitled
importattr(mode=overwrite, name=names) attr
Follow us on Twitter @IHSEViews

jsemeano
Posts: 16
Joined: Mon Mar 20, 2017 1:36 am

Re: Import/read excel column as alpha series

Postby jsemeano » Fri Mar 24, 2017 2:21 am

Perfect. Cheers, Gareth


Return to “Programming”

Who is online

Users browsing this forum: EViews Steve and 23 guests