WFSave to Excel - Excel states "The input couldn't be recognized as a valid Excel document"

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

Redvers-Jones
Posts: 6
Joined: Mon Aug 08, 2016 3:23 am

WFSave to Excel - Excel states "The input couldn't be recognized as a valid Excel document"

Postby Redvers-Jones » Wed Jun 22, 2022 7:55 am

wfsave(type=excelxml) "[filepath]\[filename].xlsx" seemingly correctly saves a .xlsx file which can be opened via double-clicking the file. However, Excel finds the file invalid if opened via "get data" in Excel, with the following error message.

We encountered an error while trying to connect.
Details: "The input couldn't be recognized as a valid Excel document."


N.B. works correctly with text file and with other .xlsx files in same location, only problems with files generated via Eviews WFsave and Pagesave.

Has this issue been identified/resolved? Apologies if there is a duplicate in the forum, I could not find one.

Thank you for any assistance.

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: WFSave to Excel - Excel states "The input couldn't be recognized as a valid Excel document"

Postby EViews Jason » Wed Jun 22, 2022 5:50 pm

This is the first reported issue. We are looking into it.

In the meantime, you can load the xlsx file in Excel and then resave it. You can then load the newly saved file via 'Get Data'.

Redvers-Jones
Posts: 6
Joined: Mon Aug 08, 2016 3:23 am

Re: WFSave to Excel - Excel states "The input couldn't be recognized as a valid Excel document"

Postby Redvers-Jones » Thu Jun 23, 2022 9:56 am

Very helpful, thank you

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: WFSave to Excel - Excel states "The input couldn't be recognized as a valid Excel document"

Postby EViews Jason » Thu Jun 23, 2022 9:58 am

After further investigation it appears to be a fairly complicated data compression issue. The 'Get Data' Excel feature uses a different decompression algorithm than the File->Open method. We will however fix the issue in the future release of EViews 13. For EViews 12 and older, you will have to use my previous suggestion of resaving the file via Excel.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 13 guests