Importing Data from Excel

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

canboardrp
Posts: 17
Joined: Tue Mar 06, 2012 9:11 am

Importing Data from Excel

Postby canboardrp » Tue Jul 03, 2012 10:18 am

Hello,

I have a question regarding importing data from excel that I'm hoping someone can help me with.

When I'm writing a program and I have an excel file with data on multiple sheets that I need to import, what should it the code be?

For example, what options should I put to ensure that I get the all data from the below file with data on sheets 1 and 2?

Code: Select all

import P:\Eviews\Data\Price.xls

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

Re: Importing Data from Excel

Postby EViews Gareth » Tue Jul 03, 2012 10:36 am

You have to do it in two statements, one for each sheet. You cannot import multiple sheets at the same time. The import command lets you specify an Excel Range for what part of the Excel file you want to import. If my memory serves correctly, the Excel syntax for a sheet is simply sheetname!, so it would be something like:

Code: Select all

import P:\Eviews\Data\Price.xls range="sheet1!" import P:\Eviews\Data\Price.xls range="sheet2!"


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests