Page 1 of 1
Identify a missing date importing from Excel
Posted: Fri Sep 13, 2013 3:27 am
by shm83
Good morning:
If we are programing within a Dated WF (Daily - 5 day week), in which I know the Start Date and the End Date, and I am importing 2 series from an Excel file (the first column is the date, and the second a value), how can I make Eviews identify a missing date from the Excel, leaving the correspondent value as NA??
I do not know if this is possible :s
Thank you
Re: Identify a missing date importing from Excel
Posted: Fri Sep 13, 2013 7:59 am
by EViews Gareth
Probably the easiest way is to create the daily page first, then import the data into it. EViews will fill in the missings with NAs.
Re: Identify a missing date importing from Excel
Posted: Mon Sep 16, 2013 1:06 am
by shm83
I have tried with this:
Code: Select all
%path = @runpath
cd %path
' Open daily (Mon-Fri) wf
wfcreate(wf=dailydata) D5 01/01/2013 12/30/2013
read(a2, s= sheet1) InputSeries.xls 3
My source Excel has 3 columns, the first one with the dates, and the 2nd and 3rd with values.
If there is a date missing, for example the 8th of Jan, in the Excel file, Eviews places the excel original 9th of Jan value in the 8th of Jan (in Eviews) row instead of filling that date with an NA. Could it be the date format I use in the Excel file (dd/mm/yyyy) the problem?
I attach the example excel so It can be useful to understand my issue.
Thanks once more.
Re: Identify a missing date importing from Excel
Posted: Mon Sep 16, 2013 7:11 am
by shm83
If I import it "manually" from the WF window it works, but i cannot make it through code (as a part of a program)

Re: Identify a missing date importing from Excel
Posted: Mon Sep 16, 2013 7:30 am
by EViews Gareth
Use import, not read.
Re: Identify a missing date importing from Excel
Posted: Mon Sep 16, 2013 8:01 am
by shm83
Thank you, I was also trying with import (type=excel) and other arguments, and all gave me problems.
Again, the easier, the better. Just a simple
does it.