Page 1 of 1

import time series from tables stored in yearly Excel sheets

Posted: Tue Jan 12, 2021 2:09 am
by T8SCH
Hi,

I have data with the following dimensions: time * activity * product.

The source Excel file is structured as follows (see attachment): for each year we have a sheet containing a table with activity identifiers in lines and product identifiers in columns.

I want to end up with a time series workfile and "pool" series, i.e. named "activity_product".

What is the most efficient way to program this import statement?

I couldn't find such an example in the user guide or forum. Thanks in advance for your help!

nb: i'm using EViews 11 Enterprise edition but we will switch to EViews 12 soon

Re: import time series from tables stored in yearly Excel sheets

Posted: Tue Jan 12, 2021 10:02 am
by EViews Gareth

Code: Select all

close @wf
wfcreate(page=master) u 1
for !i=2008 to 2018
   pageload(page=!i) data_subset.xlsx range={!i}!$E$6:$I$14 colhead=2 namepos=custom colheadnames=("Name","Description")
   rename series01 activity
   activity = @makevalidname(activity)
   series date = !i
   pageselect master
   pageappend {!i}
   pagedelete {!i}
next
pagecontract if date<>na
pageunstack(page=timeseries, namepat=?_*) activity date @ *
pagestruct @date(date)

Re: import time series from tables stored in yearly Excel sheets

Posted: Fri Jan 15, 2021 5:06 am
by T8SCH
amazing, thanks a lot Gareth!