Reading in string from EViews

For questions regarding programming in the EViews programming language.

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

PMaier
Posts: 36
Joined: Sat Sep 11, 2010 10:12 am

Reading in string from EViews

Postby PMaier » Thu Oct 25, 2012 10:57 am

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
Attachments
ListOfScenarios.txt
(428 Bytes) Downloaded 366 times

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

Re: Reading in string from EViews

Postby EViews Gareth » Thu Oct 25, 2012 11:24 am

Code: Select all

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

PMaier
Posts: 36
Joined: Sat Sep 11, 2010 10:12 am

Re: Reading in string from EViews

Postby PMaier » Thu Oct 25, 2012 11:50 am

Whoaa!

Works. Many thanks! Philipp


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests