Read of transposed data

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

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

coliveira
Posts: 3
Joined: Tue Nov 11, 2014 6:09 pm

Read of transposed data

Postby coliveira » Tue Nov 11, 2014 6:27 pm

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

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

Re: Read of transposed data

Postby EViews Gareth » Tue Nov 11, 2014 8:21 pm

Use the IMPORT command.

coliveira
Posts: 3
Joined: Tue Nov 11, 2014 6:09 pm

Re: Read of transposed data

Postby coliveira » Wed Nov 12, 2014 3:51 am

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 250 times
Could you please tell me what is missing or what am I doing wrong?

Thanks in advance.

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

Re: Read of transposed data

Postby EViews Gareth » Wed Nov 12, 2014 8:55 am

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.

coliveira
Posts: 3
Joined: Tue Nov 11, 2014 6:09 pm

Re: Read of transposed data

Postby coliveira » Wed Nov 12, 2014 8:56 am

I updated my Eviews 8 and now it works fine for me too.

Thanks a lot for your help!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests