Page 1 of 1

How to read data from Excel

Posted: Wed Apr 10, 2019 10:47 am
by acharyar
When I save data into old excel format (with extension - xls) the following commands work.
FOR %y CAN DNK FIN FRA GER IRL ITL NLD SPN SWE UK US
matrix (29, 29) {%y}
{%y}.read(b8, s = {%k}) "Input-Output Table.xls"
BUT when I have these data with -xlsx extension, these command do not work. What command do I use to make EVIEWs 10 to read these worksheets with an xlsx extension.
Thanks, Ram

Re: How to read data from Excel

Posted: Wed Apr 10, 2019 3:40 pm
by EViews Gareth
The READ command was discontinued in EViews 5.

Use WFOPEN or IMPORT instead.

Re: How to read data from Excel

Posted: Thu Apr 11, 2019 8:04 am
by acharyar
Thanks for the prompt response with help.

But still have difficulty in reading the data.
I have the following command. The objective is to read the data from "Input-Output Table.xlsx" and spreadsheet CAN (as I have other spreadsheets in that file). Since there are more rows and columns in the file than I want to read, I am asking it to read starting from B8 to 29 rows and 29 columns. What did I do wrong?
thanks, Ram
matrix (29, 29) canada
canada.wfopen(b8, s = CAN) "Input-Output Table.xlsx"

Re: How to read data from Excel

Posted: Thu Apr 11, 2019 8:15 am
by EViews Gareth

Re: How to read data from Excel

Posted: Wed Apr 17, 2019 11:08 am
by acharyar
I had already gone through the link you provided. But I could not follow it well. I am still trying it.

In any case, I wonder why the program cannot be made friendly (and logical and well documented) to make Eviews read multiple excel worksheets with an easy command. I thought that should be the first objective of any econometric software, as it is about data reading and analysing.

Re: How to read data from Excel

Posted: Wed Apr 17, 2019 11:23 am
by EViews Gareth
Drag the Excel file onto EViews. EViews will open it. Can't get much more friendly than that.

If you want the command line equivalent, then after doing it via drag, look at the command capture window.

Re: How to read data from Excel

Posted: Wed Apr 17, 2019 12:13 pm
by acharyar
I have multiple worksheets that I want Eviews to read in one file. Then I want to do vector and matrix manipulation prior to doing any analysis. So, I need Eviews command so that I transfer those excel file in Eview matrices so that I can perform manipulation of rows and columns and matrices.

If I had ready-made data to run regression, then DRAG probably would do it. And the benefit of Eviews is its capacity to read and allow manipulation of those data. I used to do it with -read- command before; I still can use -read- command but the file has to be saved with -xls- extension, which my office computer does not allow (to be saved in that old version).

So the files are -xlsx- extension. And I cannot I get it right on how to I make Eview to read an Excel file that is saved with extension -xlsx.

Thanks for your continuous feedback though.

Re: How to read data from Excel

Posted: Wed Apr 17, 2019 12:34 pm
by EViews Gareth
Can't you just drag the file onto EViews and use the capture to figure out the command you want for the opening of the Excel file? All the rest is irrelevant?