How to convert .xls to .xlsx file
You can use Excel Application Scope Activity
1.Open your .xls file with Excel Application Scope Activity.
2.Use read range activity to read your workbook.
3.Use Excel Application Scope again to generate .xlsx file.
4.Use write range activity to write data that you read in step 2.
Hope this helps
But dude, what if there are N number of sheets? Also what if the number of sheets in .xls file not defined?
In the above case all he can do is the following:-
- Open (.xls) file.
- Use shortcut keys to get to the “Save as” file window
- Type the file path along with the file name.
Note:- When we use the shortcut keys to reach the “Save As” window, you can naturally see the “file type” to be Excel Workbook, which means (.xlsx) file.
@devops please note this.
@hacky Thank man,
It’s my fault I didn’t think of that case. I’m really sorry.
It’s alright buddy!
Welcome to the UiPath Forum.
Unfortunately, if we randomly change the extension of the file while performing the move file from source to destination, the file gets corrupted.
Hope this helps.
In my system, following sequence works best, note below images for reference:-
- Step 1 -> When the excel is open, to go to files (sendhotkey (ALT + F))
- Step 2 -> to export, (sendhotkey (ALT + E))
- Step 3 -> to Change file type, (sendhotkey (ALT + C))
- Step 4 -> to go to Workbook option, (sendhotkey (ALT + Q))
- Step 5 -> to click on the Workbook option, (sendhotkey (enter))
This is very loud and clear, hope it clears your doubts. You get the window to put your filepath and filename.
Mark as solution if this helps.
Thanks and Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.