hi,
Could someone help me on how to clear excel data in background without opening excel?
thank you.
hi,
Could someone help me on how to clear excel data in background without opening excel?
thank you.
Hi
we can do it simply with a delete activity and a normal excel application scope
–that is use DELETE activity and pass the filepath of the excel whose data you want to clear
this activity rather will directly delete that whole excel file itself
–now use a EXCEL APPLICATION SCOPE and pass the same filepath of excel so that new excel file of same name will be now created and then we can insert the datatable to it
this will work in background without opening the excel
Cheers @mc00476004
Thank you for the solution, As you said the delete activity will delete the excel sheet and the excel sheet that I am using has headers already prepared in advance, prior to running the workflow.
By using this approach the headers will not be created in the new excel sheet.
Is there any other alternative?
Hi @mc00476004
Use clear datatable activity or using assign activity say newdt=Dt.clear or clone
Thanks
Ashwin.S
Hi @mc00476004
use write range activities with the selected range Or try to use macros to delete the selected range.
cheers
Happy learning
Hi, Can you please elaborate?
Hi @mc00476004
You can set the range as empty and set the propertys of addheaders to true.
or you can use macro
cheers
Happy learning
But any how you will be having the headers for datatable right
So when entering the data if ADD HEADERS is enabled in WRITE RANGE activity then it would include the header as well
Cheers @mc00476004
Hi @mc00476004
Just an idea, keep your excel with the headers as a template in some location whenever you want to fill data just take the copy of your excel and write it on it.
You can invoke code(vbnet) to clear data
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.