Trouble Importing 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

oleviasharbaugh
Posts: 17
Joined: Thu Aug 24, 2023 9:42 am

Trouble Importing Excel file

Postby oleviasharbaugh » Thu Feb 22, 2024 2:27 pm

I'm trying to import an excel file that I created using Python, but am having trouble getting Eviews to recognize it. I use an API in Python to connect to a website and automatically pull all the data I need and then export that data to the correct directory, but Eviews doesn't seem to be finding it unless I go into the Excel file after exporting from Python and save it (without making any changes). This is the error I get if I don't go in and save it:

File 'C:\Users\OLEVIA~1.SHA\AppData\ev_temp\evxlsx1\xl//xl /worksheets/sheet1.xml' does not exist in "IMPORT
R:\FORECASTING\CHR\DATA\MORTGAGERATES_TEST.XLSX @FREQ M 1971:4" on line 10.

This is the code I use to import:

Code: Select all

import R:\Forecasting\CHR\Data\MortgageRates_TEST.xlsx  @freq m 1971:4


This may be an issue on the Python side, but I wanted to double check and see if this was a problem others have had or if there were any solutions on the Eviews side. Thanks!

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

Re: Trouble Importing Excel file

Postby EViews Gareth » Fri Feb 23, 2024 11:09 am

Sounds like the Python code is creating a file that isn’t 100% compliant with the xlsx file format. Excel is able to handle the lack of compliance better than EViews is.

Easiest fix might be to save as csv from Python instead.
Follow us on Twitter @IHSEViews

oleviasharbaugh
Posts: 17
Joined: Thu Aug 24, 2023 9:42 am

Re: Trouble Importing Excel file

Postby oleviasharbaugh » Fri Feb 23, 2024 2:55 pm

Switching to CSV worked! Thanks!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 18 guests