How to add sheet to Excel file?

Hi guys,

My need is to add an Excel sheet. But when I use Balareva activity “Add sheet”, it doesnot show any alert but doesn’t work either (process done, no sheet added).
Pls tell me what’s wrong or any other way to add a sheet to excel file!
Thanks a lot.

2 Likes

Hello,

Below code creates excel sheet, this is vba code please try to run using execute macro activity.

Sub createSheet()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets.Add
ws.Name = “Mysheet”
End Sub

Cheers,
Pankaj

2 Likes

You can just use Write Range Activity. Please refer the below link.

Thanks, can you give me an .xaml file for example :slight_smile:

1 Like

I don’t have studio rite now.

You just need to use Excel application scope and write range/cell. So in write range, what ever you have mentioned as sheet will be created newly.

4 Likes

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