Error while importing an Excel file

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

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

BigD
Posts: 28
Joined: Wed Jan 04, 2017 7:05 am

Error while importing an Excel file

Postby BigD » Thu Jan 05, 2017 12:06 pm

Hi,
I'm pretty new to EViews and I was trying to import an excel file using this code:

Code: Select all

import "a.xlsx" byrow colhead=2 namepos=first @freq a 1971


It throws this error when I run it:
File'C:\Users\b\AppData\ev_temp\evxlsx\[content_types].xml' does not match expected format in "IMPORT "A.XLSX" BYROW COLHEAD=2 NAMEPOS=FIRST @FREQ A 1971".


I'm not too sure what it means.

Here's some additional information:
That a.xlsx is created by converting a .csv file to a.xlsx using a Python script (because EViews couldn't read the entire time series due to formatting issues in the .csv file).
I tested the same code with a different Excel file (that I manually renamed from .csv to .xlsx) and it worked.
Using EViews 9.5

Any help is appreciated.
Thanks!

BigD
Posts: 28
Joined: Wed Jan 04, 2017 7:05 am

Re: Error while importing an Excel file

Postby BigD » Thu Jan 05, 2017 2:39 pm

Nevermind the error above. I did some changes to the program and suddenly got this error:

Unable to match source and destination in "IMPORT "P:\~\A.XLSX" BYROW COLHEAD=2 NAMEPOS=FIRST @FREQ A @SMPL @ALL".


What does this mean?
Also, I used the same code for another independent program and it worked fine.

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

Re: Error while importing an Excel file

Postby EViews Gareth » Thu Jan 05, 2017 2:42 pm

That error indicates that EViews isn't able to match the structure of the incoming file with that of the destination workfile you're importing it into. Without seeing both files it is hard to be more specific.
Follow us on Twitter @IHSEViews

BigD
Posts: 28
Joined: Wed Jan 04, 2017 7:05 am

Re: Error while importing an Excel file

Postby BigD » Thu Jan 05, 2017 3:01 pm

The destination workfile is a temporary one. But, it should have similar structure as the .csv file (which works while importing but doesn't read full time series sometimes). But by importing newdata.xlsx, that error comes up.
Attachments
newdata.xlsx
(8.2 KiB) Downloaded 269 times
newdata.csv
(87.05 KiB) Downloaded 252 times

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Error while importing an Excel file

Postby startz » Thu Jan 05, 2017 3:13 pm

If you drop-and-drag the Excel file onto EViews, clicking transpose, it appears to load in fine. Perhaps you should load as a new workfile and then do whatever merging you need?

BigD
Posts: 28
Joined: Wed Jan 04, 2017 7:05 am

Re: Error while importing an Excel file

Postby BigD » Fri Jan 06, 2017 10:26 am

Right, I'll try that. Thanks.

As for the previous error message, I realized that the package I used in Python probably didn't convert .csv to .xslx properly hence the format was probably off. Which was why Eviews couldn't recognize it. I used a different package and solved that error.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 44 guests