Page 1 of 1

importing a serie from excel until the last non empty cell

Posted: Sun May 15, 2016 1:44 am
by melamel
Hello everyone,

Please, can you indicate me if there's a way to instruct eviews to import a serie(from excel) from one known cell to the last non empty cell ? her'se the code I'm using:

Code: Select all

import "C:\Users\amel.laref\Desktop\Nouveau dossier\DM-INF.xlsx" range="'alger 2001'!F73:FT73" byrow names=ipc @freq m 2002m1 @smpl @all
So what I want is to avoid precising "FT73", so that every time I run the code, it'll be importing the serie until the last non empty cell not only until FT73 if I have new data in the serie.

Thank you in advance for your responses.

Re: importing a serie from excel until the last non empty ce

Posted: Sun May 15, 2016 2:24 am
by EViews Gareth
Is there anything in row 74?

Re: importing a serie from excel until the last non empty ce

Posted: Sun May 15, 2016 2:33 am
by melamel
Yes, there is.
Thank you for looking at the issue.

Re: importing a serie from excel until the last non empty ce

Posted: Sun May 15, 2016 2:39 am
by EViews Gareth
Well you can try:

Code: Select all

import "C:\Users\amel.laref\Desktop\Nouveau dossier\DM-INF.xlsx" range="'alger 2001'!F73:FT" byrow names=ipc @freq m 2002m1 @smpl @all
But I don't think that will work. I don't think there is a way to do it for a single row/column.

Re: importing a serie from excel until the last non empty ce

Posted: Wed May 18, 2016 1:28 am
by melamel
Yep, it didn't work, but I found a way to, "temporarely" get what I want : I fixed the last cell in the eviews command 100 cells away from my last non empty cell, so that if I have new data eviews will import them and if not I will get NAs.
Thank you anyway ! :)

Re: importing a serie from excel until the last non empty ce

Posted: Wed May 18, 2016 2:24 am
by melamel
Hi again,
I found that there is another command which imports data from excel files as well but while using it I got NAs everywhere, can you please explain me why am I getting those NAs while I'm sure that my excel file contains data from F73 TO FU73 ? (not only, actually there is much more data but I'm interesetd in importing only the serie contained from the cell f73 to the cell fu73)
I'm using this piece of commands:

Code: Select all

read(F73, s="alger 2001",t) "M:\Méthodologie de calcul de IPC_inflation\PRIX\1- Prices\DM-INF.xlsx" ipc
Thank you in advance !

Re: importing a serie from excel until the last non empty ce

Posted: Wed May 18, 2016 2:45 am
by EViews Gareth
Read does not support .xslx