Page 1 of 1

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

Posted: Wed Jun 22, 2022 7:55 am
by Redvers-Jones
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.

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

Posted: Wed Jun 22, 2022 5:50 pm
by EViews Jason
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'.

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

Posted: Thu Jun 23, 2022 9:56 am
by Redvers-Jones
Very helpful, thank you

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

Posted: Thu Jun 23, 2022 9:58 am
by EViews Jason
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.