RachelN
(Rachel)
1
I need to rename a sheet in workbook
Please help!!!
1 Like
Hope this would help you resolve this
Cheers @RachelN
RachelN
(Rachel)
3
I cant use hot keys as am using workbook
and also invoke code is not supporting
Rename worksheet by BalaReva is showing the below error

Please help @palaniyappan
balupad14
(Balamurugan)
4
Hi @RachelN,
You use this activity to rename sheet exists in the UiPath Go .
Regards
Balamurugan.S
1 Like
aksh1yadav
(AKSHAY YADAV)
5
Hey @RachelN
You can use an existing thread to achieve this 
Rename Single Excel Sheet - #8 by aksh1yadav
RegardsâŚ!!
Aksh
1 Like
HareeshMR
(Hareesh Madasi)
6
Can you try using this activity @RachelN

1 Like
RachelN
(Rachel)
7
I have installed this custom activity and tried but getting the error

@balupad14
1 Like
RachelN
(Rachel)
8
I want to use workbook not excel @HareeshMR
RachelN
(Rachel)
9
I tried invoke code but getting error
@aksh1yadav
balupad14
(Balamurugan)
10
Can you check the sheet name is exists. can you show me the properties of the activity.
Regards
Balamurugan.S
aksh1yadav
(AKSHAY YADAV)
11
Hi @RachelN
Just check my attached example and see how you have to mention arguments to pass and take values from invoke Code.
RegardsâŚ!!
Aksh
RachelN
(Rachel)
12
New sheet Name=â08-2019â
Sheetname=âSheet1â
File path- Existing file path
1 Like
balupad14
(Balamurugan)
13
Hi ,
I have sent you sample file.
Regards
Balamurugan.S
RachelN
(Rachel)
14
i changed the file path to my file path and ran the sequence. It ran without any error but the sheet name was not changed.
Please help me on this @aksh1yadav
here is the code
I changed only the file path
aksh1yadav
(AKSHAY YADAV)
15
Hey @RachelN
Check your existing Sheetname is Sheet1 or Sheet 1?
Regards,!!
Aksh
RachelN
(Rachel)
17
I dont have excel installed in my system
Am using workbook only @aksh1yadav
aksh1yadav
(AKSHAY YADAV)
18
My Sample requires Excel to be installed.
RegardsâŚ!!
Aksh
RachelN
(Rachel)
19
Please suggest me some other option to rename the sheet using workbook(libre office)
@aksh1yadav
@RachelN
If you do not have excel installed on your computer, use the ClosedXML.
First you need to get the right import. Go to the import tab and search for âClosedXML.Excelâ
Then get the worksheet names in an invoke code:
workbook = New XLWorkbook(Filename.Trim)
worksheetnames = New List(Of String)()
For Each worksheet In workbook.Worksheets
worksheetnames.Add(worksheet.Name)
Next
Arguments are:
- workbook - in - XLWorkbook
- worksheet - in - IXLWorksheet
- gc - in - GC
- Filename - in - string
- worksheetnames - out - list of string
Then you can use another invoke code to change the sheet name:
workbook = New XLWorkbook("C:\Users\Downloads\Book1.xlsx")
worksheet = workbook.Worksheet("Sheet1")
worksheet.Worksheet.Name = "Sheet2"
workbook.Save()
Arguments are:
- workbook - in - XLWorkbook
- worksheet - in - IXLWorksheet
You can reference this GitHub if you need anymore examples - Home ¡ ClosedXML/ClosedXML Wiki ¡ GitHub
1 Like