Hi there @mattjh09. Google brought me to this thread after experiencing the same issue with the Select Item action. I found a workaround and wanted to share. I hope you got your automation working.
As you mentioned, the XLS file from SAP is really an XHTML file in disguise. If you want to read more about why this is the case, I found this article - https://answers.sap.com/questions/8257276/export-to-excel-sizing-issue.html
Anyways, after opening the file in Excel and having the bot click Yes on the file corruption warning, I used the Keyboard Shortcuts action.
F12 to bring up Save As
Tab to choose the Save As Type field. Do this before you enter the filename!
E six* times to cycle through the choices to select XLSX
- Type desired filename with full path
- Click Save
*You may need more or less depending on where in the list XLSX appears on your version of Excel. If XLSX is the first/default entry, then press E enough times to loop through all of them once. Clunky, but it seems to work.
This did the trick for me. I’ve found so far that Keyboard Shortcuts to work much more reliably than clicking or selecting. Every other solution ended up with the behavior you observed. Excel would stubbornly switch the selection back to the MHTML format right after clicking Save.
Hope this helps you or anyone else experiencing this issue.