Hi all.
I met a problem that sound quite strange. I use wfopen command to open a file. The program does not allow me to open the excel file by popping a
error message saying that NA exists in date index. However, there is no NAs in the index at all. Interestingly , when I keep the excel file open in my desktop and run the command
again, everything is fine.
Could anybody tell me why? and possibly any suggestions?
Thanks a million in advance.
Liu.
wfopen(page=x) "C:\Users\Liu\Desktop\market.xlsx" colhead=1, range=sheet1 namepos=first
pagestruct(freq=D5) @date(date)
Why do I have to keep the excel file open?
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Why do I have to keep the excel file open?
- Attachments
-
- market.xlsx
- (1.02 MiB) Downloaded 329 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Why do I have to keep the excel file open?
What's the build date of your copy of EViews 7? (You can see by Help->About EViews)
Re: Why do I have to keep the excel file open?
It was built on April 5 2011
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Why do I have to keep the excel file open?
Hmm, weird - I don't have the same problem - your program works for me whether the file is open in Excel or not.
-
EViews Chris
- EViews Developer
- Posts: 161
- Joined: Wed Sep 17, 2008 10:39 am
Re: Why do I have to keep the excel file open?
I also can't reproduce the problem on my machine but I can think I might be able to guess what is going wrong.
The date column in your workfile seems to contain a mix of excel date values (which are actually numbers with date formatting applied) and text strings containing dates. The numbers should always read in correctly. The text dates are a bit less reliable, particularly if there aren't very many of them, because we have to guess what format the dates are in.
You can see on my machine how the dates (pasted from Excel) are changing back and forth between month/day/year and day/month/year format because the dates that are numbers will display based on local settings while the strings will stay the same.
11/30/2010
01/12/2010
02/12/2010
03/12/2010
06/12/2010
07/12/2010
12/8/2010
12/9/2010
12/10/2010
12/13/2010
14/12/2010
12/15/2010
That said, on my machine (running the latest build of EViews 7.2) EViews seems to be able to read this fine anyway. So the first thing you should try doing is to download the latest build of EViews (using Help...EViews Update...) and see if that fixes your problem.
If it doesn't, you probably need to reformat the date column in your file so it is either all date values or all strings within Excel.
By the way, when the file is open inside Excel, we read the data by communicating with Excel (because we are locked out of the copy on disk). This goes through slightly different code that on your machine seems to be behaving differently.
Hope that helps.
Chris
The date column in your workfile seems to contain a mix of excel date values (which are actually numbers with date formatting applied) and text strings containing dates. The numbers should always read in correctly. The text dates are a bit less reliable, particularly if there aren't very many of them, because we have to guess what format the dates are in.
You can see on my machine how the dates (pasted from Excel) are changing back and forth between month/day/year and day/month/year format because the dates that are numbers will display based on local settings while the strings will stay the same.
11/30/2010
01/12/2010
02/12/2010
03/12/2010
06/12/2010
07/12/2010
12/8/2010
12/9/2010
12/10/2010
12/13/2010
14/12/2010
12/15/2010
That said, on my machine (running the latest build of EViews 7.2) EViews seems to be able to read this fine anyway. So the first thing you should try doing is to download the latest build of EViews (using Help...EViews Update...) and see if that fixes your problem.
If it doesn't, you probably need to reformat the date column in your file so it is either all date values or all strings within Excel.
By the way, when the file is open inside Excel, we read the data by communicating with Excel (because we are locked out of the copy on disk). This goes through slightly different code that on your machine seems to be behaving differently.
Hope that helps.
Chris
Re: Why do I have to keep the excel file open?
Thanks Gareth and Chris.
I just downloaded the updates and the program seems to work now.
Thanks so much. Really appreciate it.
I just downloaded the updates and the program seems to work now.
Thanks so much. Really appreciate it.
Re: Why do I have to keep the excel file open?
I just met another problem after I installed the update.
Is there any change in the @pagefreq function? Before, if the page is weekly frequency, the @pagefreq will return W.
But right now it returns W(Tue) instead. and it is not constant since the day within can always change.
Is there a way I can let eviews to return simply W for the weekly frequency? This is because a lot of my programs do calculations
based on judging what the page frequency is .
Thank you.
Is there any change in the @pagefreq function? Before, if the page is weekly frequency, the @pagefreq will return W.
But right now it returns W(Tue) instead. and it is not constant since the day within can always change.
Is there a way I can let eviews to return simply W for the weekly frequency? This is because a lot of my programs do calculations
based on judging what the page frequency is .
Thank you.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Why do I have to keep the excel file open?
Bug. We'll get it fixed.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Why do I have to keep the excel file open?
Took a bit longer than normal, but the latest patch should fix it.
Re: Why do I have to keep the excel file open?
Not a problem Gareth. Thanks so much for your help.
Who is online
Users browsing this forum: No registered users and 2 guests
