How to delete the created tables from excel using UiPath?

Hi All,

I’m a newbie here. How can I delete/remove all the created tables from the excel file using UiPath?
Is there a specific activity to do that?

See my screencap attached. Thank youUiPath-table 0

1 Like

@Ru_eL
Use “Delete Column” Activity → Deletes a column table from a spreedsheet based on it name.

Hi @Ru_eL

Delete the sheet that contains the table.

Or delete the excel file if all the table presents in one file.

Thanks

1 Like

Hi

Welcome back to UiPath forum

If you looking for deleting a datatable created from excel inside the workflow the use a simple assign activity like this

dt_variable = Nothing

Or use CLEAR DATATABLE activity

Or

If you are trying to delete the sheets in excel file then use a

Which will clear specific sheet data from a excel

Or

If you want to delete the excel file itself
Then use a

Hope this would help

Cheers @Ru_eL

Hi @Ru_eL

Try the vb.net/ c# code to achieve this around

reference

Regards,
Nived N

Hi @Ru_eL

If you know the exact number of columns that should present .Follow these steps

  1. Read range the whole excel.
  2. Get the Count of the column
  3. Use Insert or delete column
    • No of Columns :Whole Count - The number of column you needed
    • Position : From which position you need to remove (i.e.,The number of column you needed+1 Thetype should be integer)
    • Sheet Name

Eg:

Note: Demo is an integer

Regards
Sudharsan

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