Execute Single Command: Convert .xls to .xlsx

Continuing the discussion from How to convert xls to xlsx:

Hi, I just want to share a quick tutorial to convert .xls to .xlsx. Thanks to the above thread.

I have .xls file with merged and styled cells as figure below. Read range & write it back won’t retain them.

Therefore, I downloaded CommandPrompt.Activities & used execute single command activity. Then simply input the Command Line.
image
image

In my case, excelcnv in Program Files folder, below is the command line.
“”“C:\Program Files\Microsoft Office\root\Office16\excelcnv.exe”" -oice ““C:\file.xls”” ““C:\file.xlsx””"

Hopefully, this helps. Happy automation :slight_smile:

1 Like

rename the file you can change extension

use rename file activity

1 Like

There is no difference between .xls and .xlsx - just rename the file.

Hi @Veera_Raj & @postwick,

Thanks for the reply. I did rename the extension manually & use move file activity to rename it. The excel file would be corrupted. For my case, it is essential to convert it as this excel file will be uploaded to Power BI & it only accepts .xlsx file, plus, currently I’m using workbook write range activity in my workflow but the activity behaves incorrectly (you can look into my post, Workbook Write Range: Problem with .xls, for more details).

Cheers,
Azeem

I just realized you said in your post that this is a tutorial, but you put it in Help/Activities. We thought you were having a problem and asking how to fix it.

You should move this post to the Tutorials tags.

Yes, I’m sorry. I just realized & I can’t change the tag after I posted it.

Regards,
Azeem

Works! Thank you for this clean solution. :grin:

1 Like