Import text from Excel to string-variable

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

Jay
Posts: 5
Joined: Wed Feb 18, 2009 12:29 am

Import text from Excel to string-variable

Postby Jay » Wed Feb 18, 2009 12:53 am

Hello, I want to import text-data from an excel-sheet to a string-variable, e.g. for assigning this text as a legend.
Is there any possibility to get this working with EViews 5.1 programming?

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

Re: Import text from Excel to string-variable

Postby jthodge » Thu Feb 19, 2009 12:16 pm

In the import dialog box or on the READ command, enter a "$" after the name of your alpha series.

Jay
Posts: 5
Joined: Wed Feb 18, 2009 12:29 am

Re: Import text from Excel to string-variable

Postby Jay » Mon Feb 23, 2009 2:59 am

That's not my problem, but how to get the text from the alpha series to an variable...

[edit]
As far as I've tested up to now, @elem(alpha, 1) generates a numeric value ... quite useless, when the content should be "UBS" or something.
Is there any similar function to @elem for my alpha series to extract a string from it?

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

Re: Import text from Excel to string-variable

Postby EViews Gareth » Mon Feb 23, 2009 9:12 am

try @elem(alpha,"1") (assuming your workfile is undated)

Jay
Posts: 5
Joined: Wed Feb 18, 2009 12:29 am

Re: Import text from Excel to string-variable

Postby Jay » Tue Feb 24, 2009 3:06 am

Yesterday I found out, that %string=alpha(1) works (the description was not that clear in the manual). But your hint works as well, though I don't understand, why the quotation marks are undocumented.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests