Page 1 of 1

Trouble Importing Excel file

Posted: Thu Feb 22, 2024 2:27 pm
by oleviasharbaugh
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!

Re: Trouble Importing Excel file

Posted: Fri Feb 23, 2024 11:09 am
by EViews Gareth
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.

Re: Trouble Importing Excel file

Posted: Fri Feb 23, 2024 2:55 pm
by oleviasharbaugh
Switching to CSV worked! Thanks!