Delete Sheet Activity Error

Hi All,
I am writing data to an excel sheet after scraping from a website. I want to delete the previous sheet before writing again. I am using ‘delete sheet’ activity but there is some error in writing command. Therefore, activity is showing error-
Argument ‘Sheet’: BC30198: ‘)’ expected.
Argument ‘Sheet’: BC30205: End of statement expected.
Argument ‘Sheet’: BC30456: ‘SheetByName’ is not a member of ‘UiPath.MicrosoftOffice365.Activities.Excel’.
Argument ‘Sheet’: BC30456: ‘SheetByName’ is not a member of ‘UiPath.MicrosoftOffice365.Activities.Excel’.
Argument ‘Sheet’: BC30561: ‘Location’ is ambiguous, imported from the namespaces or types ‘System.Activities, Microsoft.Graph’.
Argument ‘Sheet’: BC30456: ‘SheetByName’ is not a member of ‘UiPath.MicrosoftOffice365.Activities.Excel’.
Argument ‘Sheet’: BC30561: ‘Location’ is ambiguous, imported from the namespaces or types ‘System.Activities, Microsoft.Graph’.
Please help to troubleshoot.

@musmanq

first thing you need is to surround delete sheet with use excel file…later change it as excel.sheet("Sheetname")

cheers

@Anil_G
Thanks for your reply.
I have modified workflow as suggested but error occurred.

@musmanq

write range workbook activity should be outside use excel file

if you want to use inside it then use write datatable to excel activity

cheers

write range workbook Activity should be outside use excel file.

1 Like

@musmanq

Please use write range activity inside the use excel scope activity it will write the data into the range of excel and please pass out the range there and if you want to write into full excel just “ “ there

Cheers

1 Like

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