Identify a missing date importing from Excel

For questions regarding programming in the EViews programming language.

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

shm83
Posts: 35
Joined: Tue Sep 10, 2013 5:00 am

Identify a missing date importing from Excel

Postby shm83 » Fri Sep 13, 2013 3:27 am

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

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

Re: Identify a missing date importing from Excel

Postby EViews Gareth » Fri Sep 13, 2013 7:59 am

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.

shm83
Posts: 35
Joined: Tue Sep 10, 2013 5:00 am

Re: Identify a missing date importing from Excel

Postby shm83 » Mon Sep 16, 2013 1:06 am

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.
Attachments
InputSeries.xls
(36 KiB) Downloaded 439 times

shm83
Posts: 35
Joined: Tue Sep 10, 2013 5:00 am

Re: Identify a missing date importing from Excel

Postby shm83 » Mon Sep 16, 2013 7:11 am

If I import it "manually" from the WF window it works, but i cannot make it through code (as a part of a program) :|

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

Re: Identify a missing date importing from Excel

Postby EViews Gareth » Mon Sep 16, 2013 7:30 am

Use import, not read.

shm83
Posts: 35
Joined: Tue Sep 10, 2013 5:00 am

Re: Identify a missing date importing from Excel

Postby shm83 » Mon Sep 16, 2013 8:01 am

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

Code: Select all

import InputSeries.xls
does it.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests