Renaming of sheet name in excel

I am using a filter data table option to save as new individual files as per the filter applied in excel. I want to save these excel with the name "Sheet1."But i am not able to do so.any one can assist on it.


image

@vignesh.maruthappan

The “Write Range Workbook” activity looks fine, that should create an Excel with sheet name “Sheet1”

If you are talking about csv sheet name, csv sheet name always follow the file name, so you may change the file name to “Sheet1” in order to rename the csv sheet name

1 Like

Hi,

If Excel is installed in your robot machione, can you try RenameSheet activity?

Or if not, can you try the following sample?

Using wb As New ClosedXML.Excel.XLWorkbook(filename)
Dim sheet As ClosedXML.Excel.IXLWorksheet = wb.Worksheet(currentSheetName)
sheet.Name=newSheetName
wb.Save()
End Using

Sample
Sample20240403-1.zip (8.3 KB)

Regards,

1 Like

Hi @vignesh.maruthappan ,

You can use the ‘Rename Sheet’ activity, Attaching the official documentation from UiPath Site for your reference.

if the package you are using is not supporting this activity, Check if you have ‘Invoke VBA’ Activity. We can make use of that to rename the sheet as well.

Hope this helps you out, if it does mark the response as solution or if you need further assistance Always happy to help out.

Happy Automating…!

Thanks,
Gautham.