I am having difficulties adding and renaming an excel sheet in a workbook, I went through some previous post referring to use hot keys activity, but that is not my mission. I like to use codes to solve the purpose.
workbookapplication.setSheet(sheetname as string, createnew as boolean)
I tried to use this code but did not get the success. Could someone help me to understand setSheet and getSheet method and is there any other method I should use to add and rename sheet?
— Fine to create a new sheet in excel a simple workaround is we can use use excel application scope activity and pass the file paste of the excel as input
— within this scope use a simple write cell or write range activity with the sheetname you want… with double quotes and it will create a new sheet in that excel
Invoke VBA is actually easier than you think. When it is inside an Excel Scope, it interacts with the window, so it’s just a matter of using the VB for changing the sheet name.