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
Iportin Excel matrix
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- EViews Developer
- Posts: 799
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Iportin Excel matrix
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?
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?
Re: Importing Excel matrix
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.
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.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
-
- EViews Developer
- Posts: 799
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Iportin Excel matrix
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.
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.
Re: Importing Excel matrix
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
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 Developer
- Posts: 799
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Iportin Excel matrix
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.
Re: Iportin Excel matrix
It works! Thanks a lot for your help!
Who is online
Users browsing this forum: No registered users and 25 guests