Automating some modification to Excel

HI Everyone,

I have an csv file open in excel and i am trying to do a file save as using mouse clicks and save it as an xslx file. When i created my automation project and ran it the automation worked fine. But when ever the file name changes the automation fails. It seems to be looking for/referencing the file name with which the automation was created when i click on the file button and keeps failing.
Is there a way to get around this issue?
Is there a different way to achieve this?

Thank you,


Welcome to our UiPath community.

Can you please share the screenshot of the error message here.

Hi @khader.abdul ,

That could be because the Window Title is changing(as the name of the file changes), so the Mouse Selector has to be refined by adding Wildcards in appropriate locations, however this approach is not recommended.

If you want to save a csv file as Excel, you can simply read it using the Read CSV Activity and then write that DataTable to an Excel File using the Write Range Activity under Workbook.

Here is a short example →

image (20.6 KB)

Kind Regards,
Ashwin A.K


@khader.abdul It is not recommended to use UI automation to convert csv to xlsx file. You can achieve this using activities

Capture (2.6 KB)

Attached it.


@ushu Thanks for the reply Usha.

Trying the approach you recommended. I am not seeing the same exact fields for Write range which are shown in your screenshot. Please see what i am seeing. I am not seeing the option of where to save the xslx file.


@lakshman Replied to your query. Thanks for the reply.


@khader.abdul , You are using the Write Range of the Excel Activities.

Use WorkBook Write Range Activity, We will be able to Save the Data in a Different Excel file.


Remove the title attribute from the selector and then check once.

@supermanPunch @ushu

I tried the Write Range activity but the am getting the below error. Not sure what may be causing it.


@khader.abdul ,

You have provided the Wrong Extension. The extension should be ".xlsx"

Thank you for the inputs and suggestions and comments everyone. My issue is resolved.


1 Like