Page 1 of 1

how to import a serie from excel into an existing wrokfile

Posted: Thu May 12, 2016 6:28 am
by melamel
I want to import a serie from an excel file which is called DM-INF into an existing workfile, how can I do it please?
I used the command capture and it gave me this command:

Code: Select all

import "C:\Users\amel.laref\Desktop\Nouveau dossier\DM-INF.xlsx" range='Alger 2001'!$F$73:$FT$73 byrow colhead=0 namepos=all na="#N/A" names=(ipc) @freq M 2002M01 @smpl @all
But when copying it in a program, all the part which comes after the single quotation (') is interpreted as a comment so it's not taken into account. How can I fix the problem please?
Thank you for your responses!

Re: how to import a serie from excel into an existing wrokfi

Posted: Thu May 12, 2016 7:25 am
by EViews Gareth

Code: Select all

import "C:\Users\amel.laref\Desktop\Nouveau dossier\DM-INF.xlsx" range="'Alger 2001'!$F$73:$FT$73" byrow colhead=0 namepos=all na="#N/A" names=(ipc) @freq M 2002M01 @smpl @all

Re: how to import a serie from excel into an existing wrokfi

Posted: Thu May 12, 2016 8:01 am
by melamel
Thank you very much !

Re: how to import a serie from excel into an existing wrokfi

Posted: Thu May 12, 2016 12:05 pm
by EViews Steve
This was a bit tricky to fix as EViews wants to use single quotes for long sheet names in a lot of different places and single quotes are almost ALWAYS considered a comment in an EViews program. Gareth's solution of just using double quotes around the whole range value works, but also looks a bit unwieldy when it's just the long sheet name, like this:

Code: Select all

range="'Alger 2001'"
So I changed EViews to use double quotes instead. Either of the following will now work (after the next patch):

Code: Select all

range="Alger 2001"!$F$73:$FT$73
(this is what you'll see generated by our command capture window now)

or

Code: Select all

range = "Alger 2001!$F$73:$FT$73"
For backwards compatibility, single quotes will continue to work just fine in the command window post patch. But in an EViews program, you can now use the captured command which uses double quotes.

Steve

Re: how to import a serie from excel into an existing wrokfi

Posted: Wed May 18, 2016 1:34 am
by melamel
That's really great ! Thank you a lot ! :)