Import string lists from excel

For questions regarding programming in the EViews programming language.

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

morak5
Posts: 16
Joined: Thu Jan 16, 2014 2:19 pm

Import string lists from excel

Postby morak5 » Mon Oct 20, 2014 12:58 pm

Hi,

I'm trying to create some string lists using lists of variables stored in an excel file.

For example in the attached excel file, I have a list of country names in the "Country" worksheet and sector names in the "Sector" sheet and I would like to create %country and %sector string lists in my workfile so that I can loop through them. There must be an easy way to do this, but I just couldn't figure it out.

Any tip would be much appreciated.

M.

Eviews Version: 8E
Attachments
LIST.xls
(17 KiB) Downloaded 400 times

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

Re: Import string lists from excel

Postby EViews Gareth » Mon Oct 20, 2014 1:17 pm

The only real way to do this is to open up those sheets as new pages in your workfile, bringing them in as alpha series. Then convert the alpha series to an svector (using @convert), then copy the svector over to your data page and loop through the elements of it.

morak5
Posts: 16
Joined: Thu Jan 16, 2014 2:19 pm

Re: Import string lists from excel

Postby morak5 » Mon Oct 20, 2014 1:21 pm

I see. Many thanks, Gareth.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest