Solved

file extension is not valid

  • 18 August 2021
  • 3 replies
  • 541 views

Userlevel 2
Badge +4
  • Do Gooder (Customer)
  • 6 replies

When using the RMB option Output to export selected lines to Excel produces a message when Excel opens ‘Error cannot open open the file ‘CustomerAnalysis 210818-102120.xlsx’ because the the file format or the file extension is not valid, Verify that the file has not been corrupted and that the file extension matches the format of the file.  Click OK and excel is populated with the selected data.  If exported as .xls the message return is slightly different ‘The File format and extension of CustomerAnalysis 210818-103355.xls’ don’t match.  The file may be corrupted or unsafe.  Unless you trust the source don’t open it.  Di you want to open it anyway?

icon

Best answer by Adam Bereda 18 August 2021, 11:56

View original

This topic has been closed for comments

3 replies

Userlevel 7
Badge +16

Hi, 
I think IFS output produces text or csv file, and not .xls/.xlsx. Please check your output channel settings if you do not overwrite default file extension for file format. 
To avoid this message, you should use csv file with default extension and make either Excel default application to open csv files or indicate Excel as application to be opened for this output channel.

Userlevel 7
Badge +16

Hi @Istar ,

 

As @Adam Bereda mentioned the solution id - 286561 confirm that. Adding below content for further clarification

 

RND resolution text of the above solution is below. :- 

The output channel allows a user to export files in four different formats: CSV, XML, Text, HTML. Any
of the above file formats can be saves with a custom extension. The custom extension has to be an alternative extension to the default extension set for the above 4 types (eg. For HTML, the default extension setis .HTM. A custom extension such as .HTML can be used. The file will still be a valid HTML file.). 
When a CSV type file is saved with a .XLSX format, Excel will treat it as an Excel Workbook. But the internal content of the file is not actually that of an Excel Workbook, hence Excel will display an error. Having an arbitrary custom extension does not mean that the file will be saved in the extension format. In Addition,it does not mean that it would be possible to open the file using an application that opens files with that extension.

Userlevel 2
Badge +4

Thanks for the replies, changing the file extension to .csv resolved the issue.