I can't change my SAP export (.mhtml) to a .xlsx

Hi all,

I have an export file in SAP that comes through as a Single Page Web format (.mhtml). When I try the following steps, the file is still saved as a .mhtml file, even though excel workbook is selected from the dropdown. I’ve even tried manually entering an extension of .xlsx but the file extension just ends up being .xlsx.mhtml. Any suggestions?

I’m a new user so I’m not sure if the image will come through but my automation clicks save icon > click no to keep using that format > Select Combo Box Item (“Excel Workbook”) > Click “Desktop” > Click save. Then it still asks if I want to save in .mhtml format.

Hi @ mattjh09,

Fisrt time i add that type of issue was becouse the selector was dynamic:

Second time i see nothing dynamic so for your select idem work in save as type click first in the arrow.
i this this second option will work

Hi Luis,

Thank you for this alternate solution, but when I use two clicks (1 click for the dropdown and 1 for the Excel Workbook selection) instead of select item, it clicks on the dropdown first then clicks on where the Excel workbook should have been. I tried using hover for both instances before and after the clicks and had the same issue. Here is what my selector for the dropdown looks like. Is there any other solution to working around this?

Ok after that click to dropdown, press use select item and press F2 you will have 5 seconds to chose Excel workbook. try that

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.

  1. F12 to bring up Save As
  2. Tab to choose the Save As Type field. Do this before you enter the filename!
  3. E six* times to cycle through the choices to select XLSX
  4. Type desired filename with full path
  5. 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.