Page 1 of 1

Reading in string from EViews

Posted: Thu Oct 25, 2012 10:57 am
by PMaier
Hi,

I have a bit of difficulties to import a string from Excel.

In the attached text file, I have build a string containing a number of spaces. The scenario is as follows: I already have a workfile open, and would like to read in this string and assign it to, say, variable "%list" in EViews. Then, I will loop through the different elements of the string.

I had some difficulties with the "read" command, as e.g.

Code: Select all

read(t=txt) "h:\ListOfScenarios.txt" name $ test
only returns NA's.

Any advice or sample code would be highly appreciated,

Philipp

Re: Reading in string from EViews

Posted: Thu Oct 25, 2012 11:24 am
by EViews Gareth

Code: Select all

text mytext mytext.append(file) "h:\ListOfScenarios.txt" mytext.svector mysvec %mylist = mysvec(1)

Re: Reading in string from EViews

Posted: Thu Oct 25, 2012 11:50 am
by PMaier
Whoaa!

Works. Many thanks! Philipp