Iportin Excel matrix

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

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

jmphilip
Posts: 5
Joined: Fri Apr 28, 2017 2:11 pm

Iportin Excel matrix

Postby jmphilip » Sat Apr 29, 2017 12:06 am

Hello,

I would like to import an Excel matrix with different formats (one, two or three columns and one row) in command mode. I would like to read and import variables names (in the first column)
I would like to be able to import time (in column)
Would you have some examples?
Thanks very much
JM

EViews Steve
EViews Developer
Posts: 798
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Iportin Excel matrix

Postby EViews Steve » Tue May 02, 2017 10:01 am

Need more details...

Are you trying to read in a single value to put into an EViews programming variable? Or are you trying to import series objects (or a matrix object) from your Excel data?

jmphilip
Posts: 5
Joined: Fri Apr 28, 2017 2:11 pm

Re: Importing Excel matrix

Postby jmphilip » Tue May 02, 2017 11:50 am

Hi,
Thanks for your reply
I am trying to import all names and data of a square matrix in one shot.
I would like variable names to be imported alongside with associated data. I would not like to be obliged to give the variable names in Eviews.
For example, variable names would be in the first column and years in the first row.

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

Re: Iportin Excel matrix

Postby EViews Gareth » Tue May 02, 2017 12:10 pm

Just drag the Excel file onto EViews.
Follow us on Twitter @IHSEViews

EViews Steve
EViews Developer
Posts: 798
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Iportin Excel matrix

Postby EViews Steve » Tue May 02, 2017 12:12 pm

Hmm, that didn't really answer my question. Let me ask it a different way...

If you drag and drop the excel spreadsheet onto EViews, you will see our Import Wizard dialog appear. Using the wizard, you can specify how to read the data into EViews (such as telling EViews to use a particular row (or column) as the name field, how many rows (or columns) to read, etc). At the end of this, you will have a new workfile where each column (or row) of your source data has been placed into a different series objects (one for each column or row of data).

If you'd rather have your matrix read in as an EViews numeric matrix (a single matrix object), you can select File->Import->Matrix from file... (you must already have a workfile open in EViews before this option will be available). This will start another import wizard that's focused on allowing you to specify the range of your excel data. Because matrices in EViews can only contain numeric data, your variable names and/or date values will be read in as NAs.

Finally, if you'd like to import your matrix as an EViews table object, you can do so by selecting File->Import->Table from file...

So how you get your data in depends on how you'd like your data to be represented in EViews. Does this help?

Also, show us a sample of your source data so we have a better idea of what you're trying to do. You can take a screenshot of your excel spreadsheet and include it in your reply post. Or simply include the spreadsheet file itself.

jmphilip
Posts: 5
Joined: Fri Apr 28, 2017 2:11 pm

Re: Importing Excel matrix

Postby jmphilip » Fri May 05, 2017 8:59 am

Thanks very much, but I want to use commands, not user interface like drag and drop

I am looking for something like
%file = "C:\xxx\Data_xxxx"
wfopen(page=xxx) %file

I would also like to open multiples sheets, having different formats.

Thanks,

JM

EViews Steve
EViews Developer
Posts: 798
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Iportin Excel matrix

Postby EViews Steve » Fri May 05, 2017 9:01 am

If you use the EViews GUI to perform the import, you can look on the Capture window to see what the associated command was for the action just performed. You'll see the associated IMPORT command with all the proper options and arguments there.

jmphilip
Posts: 5
Joined: Fri Apr 28, 2017 2:11 pm

Re: Iportin Excel matrix

Postby jmphilip » Fri May 05, 2017 12:36 pm

It works! Thanks a lot for your help!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 9 guests