Page 1 of 1

Importing .xlsx files

Posted: Mon Aug 17, 2015 8:39 am
by RDS
It seems that Eviews 8 cannot import .xlsx files.
If this statement is incorrect, how do you import such files?

Re: Importing .xlsx files

Posted: Mon Aug 17, 2015 8:53 am
by EViews Gareth
EViews 8 can handle .xlsx files just fine. Both the WFOPEN and IMPORT commands should recognise the type automatically.

Re: Importing .xlsx files

Posted: Mon Aug 17, 2015 9:00 am
by RDS
This file can be imported (.xls):
read(e,b10,s=ip_cpi_un) database_monthly_lastfriday.xls EA_IP US_IP EA_CPI US_CPI EA_UR US_UR EA_loans_hh EA_loans_nfcs

This one does not works (.xlsx):
read(e,b10,s=ip_cpi_un) database_monthly_lastfriday.xlsx EA_IP US_IP EA_CPI US_CPI EA_UR US_UR EA_loans_hh EA_loans_nfcs

It is the same file, just the extensions is different. Any reason?

Re: Importing .xlsx files

Posted: Mon Aug 17, 2015 9:03 am
by EViews Gareth
Yes, you aren't using the WFOPEN or IMPORT commands.

The READ command was discontinued in EViews 4 (way before .xlsx was invented).

Re: Importing .xlsx files

Posted: Mon Aug 17, 2015 9:19 am
by RDS
Unfortunately I could not find the answer in the Command and Programming Reference.

This does not work:
wfopen(e,b10,s=ip_cpi_un) database_monthly_lastfriday.xlsx EA_IP US_IP EA_CPI US_CPI EA_UR US_UR EA_loans_hh EA_loans_nfcs

I need to get the data from cell "b10" in worksheet "ip_cpi_un"

Thanks for your help

Re: Importing .xlsx files

Posted: Mon Aug 17, 2015 9:25 am
by EViews Gareth
What happens if you just try:

Code: Select all

wfopen database_monthly_lastfriday.xlsx

Re: Importing .xlsx files

Posted: Mon Aug 17, 2015 9:33 am
by RDS
In the same file, I have many worksheet.
When I do what you suggest, I get one variable with a time series and other variables with strange names and with a sample size from 1 to 205

Re: Importing .xlsx files

Posted: Mon Aug 17, 2015 9:37 am
by EViews Gareth
You probably need to use the range= argument then to specify which sheet you want.

Re: Importing .xlsx files

Posted: Tue Aug 18, 2015 3:29 am
by RDS
It would be very useful if Eviews could validate the read command also for .xlxs files.
Is one useful value added compared to STATA and RATZ.

Re: Importing .xlsx files

Posted: Tue Aug 18, 2015 6:00 am
by EViews Gareth
The Import and wfopen commands do everything that Read does, and much much more.

Re: Importing .xlsx files

Posted: Tue Aug 18, 2015 6:50 am
by RDS
Can you please make me an example of uploading three time series X Y Z from cell B10 in a worksheet titled "Data" which is in a file titled example.xlxs?

Many thanks.

Re: Importing .xlsx files

Posted: Tue Aug 18, 2015 7:11 am
by EViews Gareth

Code: Select all

import example.xlsx range="data"

Re: Importing .xlsx files

Posted: Tue Aug 18, 2015 7:17 am
by RDS
This imports all the worsheet "Data" and not X Y Z.
Immagine I have 100 time series and I want to import only X Y Z starting from cell B10

Re: Importing .xlsx files

Posted: Tue Aug 18, 2015 7:31 am
by EViews Gareth

Code: Select all

Import example.xlsx range="data!b10:whereever"