hi,
i'm trying to write the command line to import a file structured like the excel here. i have two questions:
1) what type of workfile i need to create before using the import command (assuming i shall be using import), for now i'm using an annual workfile, but not sure it's right
2) when i try something like this
import L:\xxx\MichelaS\xxx\byCountry\AU\database.xlsm range="test" @id bankid @date(year) @destid bankid @date
i get the error "different number of id series provided for source and destination", i don't understand this error message, what are the source and destination ID series? my source ID would be BankID and the destination should also be BankID - yy right?
sorry but it's the first time i try to import data structured as panel.
many thanks
mikela
importing panel data from excel
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
importing panel data from excel
- Attachments
-
- panelTest.xlsx
- (21.95 KiB) Downloaded 678 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: importing panel data from excel
The command you have is fine (and works for me, just fine).
Is your copy of EViews up to date?
If so, could you provide the workfile you're importing in to?
Is your copy of EViews up to date?
If so, could you provide the workfile you're importing in to?
Re: importing panel data from excel
my copy is Eviews 8, 64-bit, Jun 19 2013 build (not sure this is the latest).
i don't have a workfile as i create it in the program, so i'm basically running these two lines in my program
wfcreate(wf=australia) y 1999 2014
import L:\DRS\Users\MichelaS\Bankscope\byCountry\AU\panelTest.xlsx range="test" @id bankid @date(year) @destid bankid @date
and i get this error message "Different number of id series provided for source and destination in "IMPORT L:\DRS\....""
is it because the workfile i create is annual? what kind shall i be creating? undated?
thanks for your help!
michela
i don't have a workfile as i create it in the program, so i'm basically running these two lines in my program
wfcreate(wf=australia) y 1999 2014
import L:\DRS\Users\MichelaS\Bankscope\byCountry\AU\panelTest.xlsx range="test" @id bankid @date(year) @destid bankid @date
and i get this error message "Different number of id series provided for source and destination in "IMPORT L:\DRS\....""
is it because the workfile i create is annual? what kind shall i be creating? undated?
thanks for your help!
michela
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: importing panel data from excel
The destination workfile (the one you created) does not have a series called bankid
Re: importing panel data from excel
now i found an interim solution but I really don't understand the logic of eviews in creating a workfile and opening a workfile.
Why do you have two commands wfcreate and wfopen, it's just not clear (even though i see they are different commands).
Anyway, if i use the following command:
wfopen(page=AU) "L:\DRS\Users\ccc\Bankscope\byCountry\AU\database.xlsm" range="data"
this works and creates a nice workfile with a page structured as a panel and called AU
Since i need to import several pages (one for each country), if i write
wfopen(page=AU) "L:\DRS\Users\ccc\Bankscope\byCountry\AU\database.xlsm" range="data"
wfopen(page=CA) "L:\DRS\Users\ccc\Bankscope\byCountry\CA\database.xlsm" range="data"
I get two workfiles. So basically each time the program recreates a workfile. Now, my question is:
How do I create several pages in ONE workfile, in which each page would then be AU, CA, etc.? Is there any way i can say wfopen in a given wfile?
In a second step i'll have to merge all pages into one, but then i guess the command will be pageappend, but for now one thing at a time
many thanks!
m
Why do you have two commands wfcreate and wfopen, it's just not clear (even though i see they are different commands).
Anyway, if i use the following command:
wfopen(page=AU) "L:\DRS\Users\ccc\Bankscope\byCountry\AU\database.xlsm" range="data"
this works and creates a nice workfile with a page structured as a panel and called AU
Since i need to import several pages (one for each country), if i write
wfopen(page=AU) "L:\DRS\Users\ccc\Bankscope\byCountry\AU\database.xlsm" range="data"
wfopen(page=CA) "L:\DRS\Users\ccc\Bankscope\byCountry\CA\database.xlsm" range="data"
I get two workfiles. So basically each time the program recreates a workfile. Now, my question is:
How do I create several pages in ONE workfile, in which each page would then be AU, CA, etc.? Is there any way i can say wfopen in a given wfile?
In a second step i'll have to merge all pages into one, but then i guess the command will be pageappend, but for now one thing at a time
many thanks!
m
Re: importing panel data from excel
i've got it! i have to use first
wfload "myworkfile"
and then
pageload(page=AU).....
and it adds pages to myworkfile!
thanks anyway!
michela
wfload "myworkfile"
and then
pageload(page=AU).....
and it adds pages to myworkfile!
thanks anyway!
michela
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: importing panel data from excel
I would have thought the best thing to do is just use the import command without creating a workfile before hand.
Re: importing panel data from excel
i tried, but with import i still get an error message regarding the ids somehow...
Actually it also works by using only pageload recursively without opening or i shall say loading a workfile first, it just adds pages to the new workfile created by pageload.
Actually it also works by using only pageload recursively without opening or i shall say loading a workfile first, it just adds pages to the new workfile created by pageload.
Who is online
Users browsing this forum: No registered users and 2 guests
