importing a serie from excel until the last non empty cell

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

importing a serie from excel until the last non empty cell

Postby melamel » Sun May 15, 2016 1:44 am

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.

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

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

Postby EViews Gareth » Sun May 15, 2016 2:24 am

Is there anything in row 74?

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

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

Postby melamel » Sun May 15, 2016 2:33 am

Yes, there is.
Thank you for looking at the issue.

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

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

Postby EViews Gareth » Sun May 15, 2016 2:39 am

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.

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

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

Postby melamel » Wed May 18, 2016 1:28 am

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 ! :)

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

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

Postby melamel » Wed May 18, 2016 2:24 am

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 !

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

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

Postby EViews Gareth » Wed May 18, 2016 2:45 am

Read does not support .xslx


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests