How can i empty data by reference by sheet name?

I have one excel file and have some data inside
image

I need to empty data in every fields by specific by sheet name … such as “Sheet1”

so, the result will be good if it like this
image

Thanks,

Hi @lovepong66

You can try with Delete Range activity

In the Range try with this expression

"A2:"+UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(DtRead.Columns.Count)+(DtRead.Rows.Count+1).ToString

Check out this XAML file

DeleteRange.xaml (6.7 KB)

image

Regards
Gokul

1 Like

Hello @lovepong66

You can try invoking VBA

dim ws as worksheet

Set ws = Sheets("Sheet1")

ws.Cells.Clear

Thanks,
Prankur

Hello @lovepong66
try this

  1. Use Modern Excel activity
  2. Drag and drop the Excel process Scope.
  3. In which, place the Use Excel activity.
    3.1 Place the for each row in the excel activity and uncheck the Has Header option
    3.2 within this place the Clear Sheet/ range/ Table Activity and uncheck the has header

100% for me Thanks,

1 Like

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