Page 1 of 1
Read in from Excel with source & units
Posted: Tue Mar 26, 2013 11:31 am
by seahorse
Folks,
Very new to Eviews (this week). Appreciate your patience! I am trying to write a program that will read in a large list of series from Excel with all of their associated Meta Data (label, displayname etc.). Is this possible? I can only get in the data and the variable name. I don't want to have to manually type in all the sources, units etc. in Eviews.
Attached a very simple file with just two of the hundreds of variables I will need to import.
Appreciate the help
NG
Re: Read in from Excel with source & units
Posted: Tue Mar 26, 2013 11:34 am
by EViews Gareth
Which version of EViews are you using?
Re: Read in from Excel with source & units
Posted: Tue Mar 26, 2013 1:22 pm
by EViews Gareth
In EViews 8:
Code: Select all
wfopen bluebook.xlsx range="Readin!a1:c67" colhead=6 namepos=first
rename variable_code_ year
pageload(page=attrb) bluebook.xlsx range="readin!a1:c5" byrow colhead=1 namepos=first
pageselect bluebook
importattr(name="variable code:") attrb\
Re: Read in from Excel with source & units
Posted: Wed Apr 10, 2013 4:39 am
by seahorse
Gareth,
Thank-you so much. I have been off sick for a while and am just back today. This is so helpful to me I cannot tell you! I have been trying to understand how it works and I cant fully follow it but I am sure you are too busy to explain the code to me! However I have one follow up question, I want to read in the display name but it seems to come in as a separate text attribute with the same name (Display Name). I want the second label to be what it shows on charts so how do I get it to read that in from the spreadsheet? If I read in at present I get the following - two 'Display Name' attributes:
Name: EV_M
Display Name:
Last Update: Last updated: 04/10/13 - 12:26
Description: Expenditure, volume, private sector
Display Name: Expenditure, private sector
Source: Blue Book 2012
Units: £m
Remarks:
History: Imported from 'C:\EVIEWS_WORK\MODEL\bluebook.xlsx'
thanks in advance - this is so helpful for me. I am now Eviews version 8 (had a free upgrade as I bought Eviews 7 after Dec 12)
Neil
Re: Read in from Excel with source & units
Posted: Wed Apr 10, 2013 5:18 am
by seahorse
Apologies Gareth,
I worked this out myself! I needed an underscore in the Display name in excel - too hasty asking questions!
Thanks
Neil