In your Excel VBO object, add a new page and name it as "Clear Contents in range"
Add a Code stage on to the page with
- Input parameters: Handle, Workbook, Worksheet, celref
- Output Parameters: Success, Message
- Add the below code in the code tab
Code:
Dim wb, ws As Object
Dim excel, sheet, range As Object
Try
wb = GetWorkbook(Handle, Workbook)
ws = GetWorksheet(Handle, Workbook, Worksheet)
wb.Activate()
ws.Activate()
excel = ws.Application
sheet = excel.ActiveSheet
sheet.Range(celref).ClearContents
Success = True
Catch e As Exception
Success = False
Message = e.Message
Finally
wb = Nothing
ws = Nothing
excel = Nothing
sheet = Nothing
range = Nothing
End Try
The Start Stage on the page should accept the parameters: Handle, Workbook, Worksheet, celref
The End Stage on the page should send the parameters: Success, Message
Publish this page and Save.
Now, you are good to use the above action 'Turn Off AutoFilter'.
Flow would be:
1. Start
2. Create Instance
3. Open Workbook
4. Activate Workbook
5. 'Clear Contents in range' and pass the inputs- handle, workbook name, worksheet and Celref on which you want to remove content
6. Close workbook with Save set to True
7. Close Instance with Save set to True
8. End