Delete all the data in the ExcelSheet using the Excel.Delete.Range activity


I’m trying to delete all the data in the sheet using the Excel.Delete.Range activity.

I know that the current situation can be realized by specifying “A1: XFD1048576” which is the maximum value of Excel in the property of range specification, but if possible, delete up to the maximum location where the value is included think. (like opening Excel directly and selecting all by “Ctrl + A”)

Of course, if only want to realize the process, there is no problem that open Excel directly and “Ctrl + A” → “del”, but please let me know if there is a smart method using the Excel.Delete.Range activity is.

My English Sentence may be hard to read, but I would be glad if you answered it.

1 Like


use Write Cell Activity and specify range as “” and provide that sheet name.

It will write empty value into all cells of that sheet.

Thanks for Answering!

I tried that method but nothing happened to the target file.
I want you to tell me if something is wrong.

1 Like


Write double quotes “” instead of String.Empty and then try again.

I tried “” too. but result didn’t change…

Hi @nittobo5,

Instead of delete all data. Better to delete the sheet and add a new sheet in the excel with same name.


Hi @nittobo5,

I’ve delete the entire data from sheet by the below method.

I’ve connect the Excel as a db and then update all the column values into NULL.
Note: We can’t delete the table while it’s connecting.

I think this method will help you to achieve.

Thanks and Regards,
Manoj Vijayakumar (17.4 KB)

1 Like

Thank you Balamurugan.
I’ll also consider the direction of “sheet deletion → re-creation”.
In that case, is it common to delete sheets using Invoke Code?

Thank you manoj
I have never used a DataBase activity, but this method is very interesting.
I think that I want to learn by all means because it seems to be able to utilize not only this matter.

1 Like

Hi @nittobo5,

Yeah, it helped me in so many scenarios…

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