How to 'delete Excel sheet', 'Rename excel file with today function' and 'Copy and Paste the existing excel file' using Studio?

I’m not allowed to use 3rd party coding package.
Only I can use the basic activities in Studio.
But I cannot find activities to realize below functions:
-‘Delete Excel sheet’,
-‘Rename excel file with today function’ and
-‘Copy and Paste the existing excel file’

Could anyone have coding for these functions? thanks!

-‘Delete Excel sheet’, :- You can use macro to delete Sheet.
-‘Rename excel file with today function’ and :- Use Move File activity and in destination use Todays date in file name. (Date.Now.Tostring(“MMddyyyy”))
-‘Copy and Paste the existing excel file’ :- Use copy file activity.

Macro:-

Sub Delete_Sheet_WithoutWarningMessage()
Application.DisplayAlerts = False
Sheets(“Sheet2”).Delete
Application.DisplayAlerts = True
End Sub

Reference to use Macro in UiPath using Invoke VBA

Regards,
Prathamesh

1 Like

[quote=“Rita_Guan, post:1, topic:354535”]
Delete Excel sheet’,[/quote]

Now.ToString(“MMddyyyy”) or whatever format you want. Use Move File to rename it.

Don’t copy/paste. Move File.

1 Like

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