Making Eviews open excel
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Making Eviews open excel
I have a program that imports data from an excel file. For some reason it will only successfully import the data if I have the excel file open prior to running the program. This is not an issue with other excel files. What I'd like to do as a hack-y solution is just call excel to open the file from my eviews program. Failing that I guess I'd like to find out why I can't pull from this particular file and fix it that way. Any tips?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Making Eviews open excel
Best thing to do would be to provide us with the Excel file so we can try and figure out why EViews cannot open it.
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Re: Making Eviews open excel
That does seem best. Here you go.
Import code is as follows:
Import code is as follows:
Code: Select all
%secfrom = [path]\LTC_Sec_monthly.xlsx"
import %secfrom range=Page1_1 @id Claim @destid @date
- Attachments
-
- LTC_Sec_monthly.xlsx
- (15.33 KiB) Downloaded 475 times
-
EViews Jason
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Making Eviews open excel
EViews couldn't auto detect the date series 'claim' since it is out of order. It is in alphabetic order but not time order.
I also do not notice a difference as to whether or not Excel is open or not. In both cases, the above problem exist.
With that being said, try using
I also do not notice a difference as to whether or not Excel is open or not. In both cases, the above problem exist.
With that being said, try using
Code: Select all
import ltc_sec_monthly.xlsx range=Page1_1!$A$1:$L$189 colhead=1 na="#N/A" @freq M @id @date(claim) @smpl @all
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Re: Making Eviews open excel
Same issue. If I run it with the excel file closed I get this error:
Excel 2010 and Eviews 9 - July 23 2015 build.
If I open the excel file first and then run the program it's fine.Unable to determine date format of object CLAIM in [PATH] range=Page1_1!$A$1:$L$300 colhead=1 na="#N/A" @freq M @id @date(claim) @smpl @all
Excel 2010 and Eviews 9 - July 23 2015 build.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Making Eviews open excel
Could you try updating to the latest version of 9?
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Re: Making Eviews open excel
I can't actually. IT at work has pretty strict version control. I'd have to make a whole business case etc.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Making Eviews open excel
Try opening the file in Excel, saving it locally, then closing down Excel and trying to open it in EViews. Does that work?
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Re: Making Eviews open excel
Saved the file to my desktop, it was on a network mapped drive before. Exact same issue.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Making Eviews open excel
What happens if you try to open it interactively?
Do any of the data get read in correctly?
Our best guess is that it is an Excel security issue.
Do any of the data get read in correctly?
Our best guess is that it is an Excel security issue.
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Re: Making Eviews open excel
Not sure what you mean by interactively. Can you clarify?
I'm stumped too, this file is generated by Cognos report studio, saved on a network drive. Other reports generated in the same manner saved in the same location don't have this issue. The one distinction I can think of is that the date is sorted alphabetically, as was pointed out. I don't know why having the file open in excel makes a difference for that though.
I'm stumped too, this file is generated by Cognos report studio, saved on a network drive. Other reports generated in the same manner saved in the same location don't have this issue. The one distinction I can think of is that the date is sorted alphabetically, as was pointed out. I don't know why having the file open in excel makes a difference for that though.
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Re: Making Eviews open excel
Ok, I recoded the query so dates are in chronological order. Same error.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Making Eviews open excel
If you use File-Open rather than using a command to open the file.
-
ian.e.preston
- Posts: 21
- Joined: Mon Feb 23, 2015 1:06 pm
Re: Making Eviews open excel
I think I'm missing something here. Are we talking about the excel file or the eviews file?
Here are the combinations I can think of, and the outcomes that result from them:
Attempt to import into eviews without Excel open:
-Importing the data via script claims.prg - previously quoted error message
-From eviews opening my workfile, going to file -> import and trying to load the data - only shows claim header, no other columns for sectors and no actual data, can't import
Have Excel file open prior to importing to Eviews:
I can do this by double clicking the Excel file, or opening excel and the going to file -> open and loading the file, no difference
Both manual import and importing via script work fine
Does this help narrow it down?
Here are the combinations I can think of, and the outcomes that result from them:
Attempt to import into eviews without Excel open:
-Importing the data via script claims.prg - previously quoted error message
-From eviews opening my workfile, going to file -> import and trying to load the data - only shows claim header, no other columns for sectors and no actual data, can't import
Have Excel file open prior to importing to Eviews:
I can do this by double clicking the Excel file, or opening excel and the going to file -> open and loading the file, no difference
Both manual import and importing via script work fine
Does this help narrow it down?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Making Eviews open excel
Somewhat.
What happens if you save it as .xls rather than .xlsx?
What happens if you save it as .xls rather than .xlsx?
Who is online
Users browsing this forum: No registered users and 2 guests
