How to delete a sheet from excel or clear its data?


#1

How to delete a sheet from excel or clear its data?


#2

Hi,
You can make use of Excel shortcut keys
ALT + E + L or
ALT+H+D+S
Use send hotkey activity to make use of them.

PS: If you’re looking to clear DataTable then UiPath has Clear DataTable Activity.


#3

No, It is not working. I am looking for Excel sheet delete only. Can you attach some sample XAML which I can quickly refer?


#4

Here we go.
Just make sure excel is in the foreground while running the workflow.
DeletExcel.xaml (5.8 KB)


Delete a sheet in excel?
#5

Yes, I got it just now before you replied. I was missing the step where Excel needs to run in foreground. :slight_smile:
I have to add excel screen shot in XAML so that keystrokes will be done on Excel app.