Page 1 of 1

Export list of variables and labels

Posted: Wed Oct 25, 2017 7:25 am
by quark2001
Hello,

How could I export the list of all the variables in a wf, name and labels, into two columns of excel? I have seen a thread to export the list of the variables as a string, but I need also the labels.

And from a model, exporting all, or the exogeneous, or the endogeneous (name and labels)?

Thanks in advance

Re: Export list of variables and labels

Posted: Wed Oct 25, 2017 7:34 am
by EViews Gareth
For that specific formatting, you'd have to create a table object and loop through all the series, inserting their name and the attribute you're interested in into the table, then saving the table at the end.

Re: Export list of variables and labels

Posted: Wed Oct 25, 2017 7:35 am
by quark2001
Thanks a lot.

Could you please give me an example on how to structure the loop (for example, for all the variables or selecting just the exogeneous)?

Re: Export list of variables and labels

Posted: Wed Oct 25, 2017 7:39 am
by EViews Gareth
Something like:

Code: Select all

%list = model.@endoglist
!i=1
for %j {%list}
   table(!i,1) = %j
   !i=!i+1
next