Attributes question

For questions regarding programming in the EViews programming language.

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

BT454
Posts: 139
Joined: Wed Aug 02, 2017 6:07 am

Attributes question

Postby BT454 » Thu Jan 24, 2019 10:09 am

Good afternoon,
I'm exporting several a variety of data series from eviews to excel in several subsets to excel using the pagesave function. For each series the atributes structure and import procedure is identical, as is the syntax and structure in each subsets pagesave command, however some subsets are including the "display name" in attributes, and others are not (I would like to exclude "display name" in all exported attributes).
Do you have any insight into why certain subsets are exporting the 'display name' and others are not?
below are examples of the importattr command, and the pagesave commands I'm using.
I can post over full prg file and related excels files if that is helpful as well.
Thanks,
Bob

pricing subset (eventually exports 'display name' with attributes)
pageload(page=attr) c:\warem32\MMRData_NewNGB_ATTR.xlsx range="basis!B1:AI2" byrow colhead=0 names=(name, description)pageload(page=attr) c:\warem32\MMRData_NewNGB_ATTR.xlsx range="basis!B1:AI2" byrow colhead=0 names=(name, description)

pagesave(t=excel, mode=update, attr) c:\warem32\MMR.xlsx range="Table2_NAGasBasisMonthly!a6" @freq m 2005 2050 @keep pnhh prhh pnaeco pnaecocgj praeco praecocgj g_all deflatoryrus deflatoryrcan rxcan

gas volumes subset (does not export 'display name' with attributes)
pageload(page=attr) c:\warem32\MMRData_NewNGB_ATTR.xlsx range=ngb!B1:AP2 byrow colhead=0 names=(name, description)
pageselect ngbdata
importattr attr @keep description

pagesave(t=excel, mode=update, attr) c:\warem32\MMR.xlsx range="Table3_USBalancesMonthly!a6" @freq m 2005 2050 @keep dresus dcomus dindus dpowus dvehus dplpfus dinjus ddtius ddtus dnmxexus dlngexus dtius dtus sprodus slngsous scanimpus swdus stwus stus uaus invus

BT454
Posts: 139
Joined: Wed Aug 02, 2017 6:07 am

Re: Attributes question

Postby BT454 » Thu Jan 24, 2019 10:35 am

UPDATE :)
I was able to find a common thread between each subset that exports 'display name'. Each subset of data includes a deflator series. When that series is included in the pagesave, 'display name' is included in the exported attributes, when it is excluded, it is not. I'm assuming it has to be something with that specific series (likely with the attributes). Any thoughts?
Thanks,
Bob

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

Re: Attributes question

Postby EViews Gareth » Thu Jan 24, 2019 10:55 am

It is probably the case that any page that has at least one entry for displayname will save the displayname. If none of your series have a value for displayname, it won't be saved.

BT454
Posts: 139
Joined: Wed Aug 02, 2017 6:07 am

Re: Attributes question

Postby BT454 » Thu Jan 24, 2019 11:13 am

SOLVED!
The series was named using all caps in one instance, and sentence-case in another. I made the case uniform and the problem is resolved.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests