Page 1 of 1

Read of transposed data

Posted: Tue Nov 11, 2014 6:27 pm
by coliveira
Hi! I'm trying to import some transposed data from different worksheets (1300 series each) of a Excel workfile (.xls) to a single Eviews page. It's part of a loop since I have to read data from 10 worksheets of 11 different workfiles.

I use the following code but the series imported aren't named (they appear as ser1, ..., ser288, ser289, ...). Series names are on column B. What am I doing wrong? Is there another way of doing it? I've tried with pageload but I can't put all the series in the same Eviews page...

Thanks in advance

pagecreate(wf=%output2,page=%sheet) u 20
read(t,c2, S=rend_exc) %input 1300
read(t,c2, S=mliqu) %input 1300
read(t,c3, S=bnet) %input 1300

Re: Read of transposed data

Posted: Tue Nov 11, 2014 8:21 pm
by EViews Gareth
Use the IMPORT command.

Re: Read of transposed data

Posted: Wed Nov 12, 2014 3:51 am
by coliveira
Thank you for the suggestion, but I'd already tried it. With import instruction the series are named correctly but all observations are NA.

This is the code I'd used and data file:

Code: Select all

%input= "Betas 2011.xls" %sheet = "cross_inov" pagecreate(page=%sheet) u 20 import(page=%sheet) %input range="rend_exc!b2:v289" byrow import(page=%sheet) %input range="mliq!b2:v289" byrow import(page=%sheet) %input range="bnet!b3:v290" byrow
Betas 2011.XLS
(1.29 MiB) Downloaded 251 times
Could you please tell me what is missing or what am I doing wrong?

Thanks in advance.

Re: Read of transposed data

Posted: Wed Nov 12, 2014 8:55 am
by EViews Gareth
That code works for me.

It is true that the first few series, for example bnet_1 through bnet_47 contain NAs, but that's because they do in the source file.

If I open up, for example, bnet_130, it is full of data.

Re: Read of transposed data

Posted: Wed Nov 12, 2014 8:56 am
by coliveira
I updated my Eviews 8 and now it works fine for me too.

Thanks a lot for your help!