How to convert .xls to .xlsx file

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.

Hi,

Check below

Hope this helps

Thanks

@PlutoPeaM

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:-

  1. Open (.xls) file.
  2. Use shortcut keys to get to the “Save as” file window
  3. 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.

1 Like

@hacky Thank man,

It’s my fault I didn’t think of that case. I’m really sorry.

1 Like

@PlutoPeaM

It’s alright buddy!

Cheers!!

1 Like

Hi ,
We can use move file activity .

@Priyanka_Ramesh

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.

Best Reards,
@hacky

@Priyanka_Ramesh @devops @PlutoPeaM
Below is the solution I was talking about, hope this gives you basic idea.

In my system, following sequence works best, note below images for reference:-

  1. Step 1 -> When the excel is open, to go to files (sendhotkey (ALT + F))

  1. Step 2 -> to export, (sendhotkey (ALT + E))

  1. Step 3 -> to Change file type, (sendhotkey (ALT + C))

  1. Step 4 -> to go to Workbook option, (sendhotkey (ALT + Q))

  1. 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,
hacky

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.