Importing attributes from excel

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

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

jtb35962
Posts: 5
Joined: Tue Jan 10, 2017 9:30 am

Importing attributes from excel

Postby jtb35962 » Tue Jan 10, 2017 11:16 am

I am attempting to import attributes from Excel. I read that it is possible using importattr, but upon cursory attempts from reading the help options after importing a second work file with potential attributes, I cannot correctly use the command box make it work. This is likely do to my inexperience. Are there any tutorials or example programs to do this?

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

Re: Importing attributes from excel

Postby EViews Gareth » Tue Jan 10, 2017 11:20 am

No, but if you post your files I'm sure we can help out.
Follow us on Twitter @IHSEViews

jtb35962
Posts: 5
Joined: Tue Jan 10, 2017 9:30 am

Re: Importing attributes from excel

Postby jtb35962 » Tue Jan 10, 2017 11:27 am

Should I provide an example file instead? This is for making databank updates for IHS markit.

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

Re: Importing attributes from excel

Postby EViews Gareth » Tue Jan 10, 2017 11:49 am

Whatever you're comfortable with.
Follow us on Twitter @IHSEViews

jtb35962
Posts: 5
Joined: Tue Jan 10, 2017 9:30 am

Re: Importing attributes from excel

Postby jtb35962 » Tue Jan 10, 2017 12:08 pm

I have included a test file and the associated excel. I am not sure that the excel is set up correctly, but it is a start.
Thanks
Attachments
AG_Pricing_Bank_update_Test_2016_12.wf1
(1.49 MiB) Downloaded 45 times
cpwbank_2016_12b.xlsx
(2.09 MiB) Downloaded 49 times

jtb35962
Posts: 5
Joined: Tue Jan 10, 2017 9:30 am

Re: Importing attributes from excel

Postby jtb35962 » Tue Jan 10, 2017 12:16 pm

I update these and others monthly and even more series quarterly, so I need to replicate the process regularly and on a large scale.
They key is replicating something similar to Aremos banks that data can digest. Mnemonics, data update and other attributes updated.
Thanks

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

Re: Importing attributes from excel

Postby EViews Gareth » Tue Jan 10, 2017 1:02 pm

Just using this Excel file:

Code: Select all

'open the data, ignoring the attribute rows
wfopen cpwbank_2016_12b.xlsx colhead=5 namepos=first

'open the attribute as a second page
pageload(page=attr) cpwbank_2016_12b.xlsx range=sheet2!b1:pe5 byrow colhead=0 names=(name, bank, dataedge, forecastdate, longlabel)

'switch back to data page
pageselect cpwbank_2016_12b

'import attributes
importattr attr
Follow us on Twitter @IHSEViews

jtb35962
Posts: 5
Joined: Tue Jan 10, 2017 9:30 am

Re: Importing attributes from excel

Postby jtb35962 » Tue Jan 10, 2017 2:29 pm

Thank you very much. This looks like it is working and I should be able to replicate this code easily to other properly formatted excel files.
I will send a test file to the data group soon. I think this is what they are hoping to receive.
Thank you again!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 18 guests