Issues when importing multiple sheets from Excel to Eviews 7

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

Hvorre
Posts: 2
Joined: Tue Mar 22, 2016 4:45 am

Issues when importing multiple sheets from Excel to Eviews 7

Postby Hvorre » Tue Mar 22, 2016 5:31 am

First post and relatively new when it comes to Eviews, so be gentle.

I'm currently working on my masters thesis. For the thesis I have collected daily return data on 169 different Norwegian stocks and 3 indices, dating back to january 1990 for some stocks.
I thus have an excel file containing 172 sheets of data that I want to import into Eviews, with anywhere from around 2000 observations up to around 5000 observations for each stock.
Searching for a solution on how to import the sheets led me to this froum, and I found this code:

Code: Select all

%filename = "f:\OSEAXRet.xlsx" 'file name of the file to be opened %sheetnames = @tablenames(%filename) 'find the names of the sheets in that file %sheetname = @word(%sheetnames,1) 'get the first sheet name wfopen(wf=panel,page=%sheetname) %filename range=%sheetname 'open the first sheet as a new workfile (with name=panel, and pagename=the first sheet name) 'loop through the remaining sheets, loading them into the workfile one at a time for !i=2 to @wcount(%sheetnames) %sheetname = @word(%sheetnames, !i) 'get the name of the next sheet pageload(page=%sheetname) %filename range=%sheetname 'load the next sheet next
The issue is that only half of the sheets from the excel-file appears to be stored into EViews. However, the program seems to run through all 172 sheets.
So, is there a remedy for this? Is the code flawed or is the dataset too large in terms of # of observations?

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

Re: Issues when importing multiple sheets from Excel to Evie

Postby EViews Gareth » Tue Mar 22, 2016 8:01 am

Hard to say without seeing it, but it is possible you're hitting a limit on the number of pages allowed in an EViews 7 workfile.

Hvorre
Posts: 2
Joined: Tue Mar 22, 2016 4:45 am

Re: Issues when importing multiple sheets from Excel to Evie

Postby Hvorre » Wed Mar 30, 2016 2:19 am

Yeah, that appears to be the issue.
I found a solution to the issue by splitting the excel-file into three and importing them as a seperate workfile, and even though it is not optimal, it works.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests