Why do I have to keep the excel file open?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

Liu
Posts: 90
Joined: Tue Jun 08, 2010 6:22 am

Why do I have to keep the excel file open?

Postby Liu » Wed May 25, 2011 11:59 am

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)
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?

Postby EViews Gareth » Wed May 25, 2011 12:02 pm

What's the build date of your copy of EViews 7? (You can see by Help->About EViews)

Liu
Posts: 90
Joined: Tue Jun 08, 2010 6:22 am

Re: Why do I have to keep the excel file open?

Postby Liu » Thu May 26, 2011 5:04 am

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?

Postby EViews Gareth » Thu May 26, 2011 7:56 am

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?

Postby EViews Chris » Thu May 26, 2011 8:50 am

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

Liu
Posts: 90
Joined: Tue Jun 08, 2010 6:22 am

Re: Why do I have to keep the excel file open?

Postby Liu » Mon May 30, 2011 8:11 am

Thanks Gareth and Chris.

I just downloaded the updates and the program seems to work now.
Thanks so much. Really appreciate it.

Liu
Posts: 90
Joined: Tue Jun 08, 2010 6:22 am

Re: Why do I have to keep the excel file open?

Postby Liu » Mon Jun 06, 2011 1:30 pm

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.

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?

Postby EViews Gareth » Mon Jun 06, 2011 2:28 pm

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?

Postby EViews Gareth » Mon Jun 13, 2011 2:23 pm

Took a bit longer than normal, but the latest patch should fix it.

Liu
Posts: 90
Joined: Tue Jun 08, 2010 6:22 am

Re: Why do I have to keep the excel file open?

Postby Liu » Wed Jun 15, 2011 5:04 am

Not a problem Gareth. Thanks so much for your help.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests