Toad World® Forums

How to clear excel sheet


#1

Hi,

I would like to clear excel sheet before I insert new data to it. How can I do it?

-Heikki


#2

We do not have a clear workseet action at this point. I have added CR69,895 for this enhancement.

Possible work arounds:

If the file exists you can select the worksheet you want your result set to go to. This will always go to that worksheet and overwrite what is on the sheet.
However, if your result has less rows than the last time, the prior rows will still exist and corrupt your worksheet data. (Sorry). See attached screenshot.

You could also use an Excel file as a template. If you are building an excel report with mutliple reports in different worksheets, start with a template that has the named worksheets, headings, etc but no data. Then make a copy of this and insert the new data. This can be easily used in an automation script.

Debbie
SameSheet.png


#3

Hi.

Template solution works fine. Thanks.

-Heikki