To save the deleted ID inside the server to Excel Sheet

Hi,

I am completely new to UiPath, so I need guidance on the issue below. When the RPA clicks on Delete, I need to save the ID, record the time it was deleted, and add this information to an Excel file.

Thank you so much!

@AZNI_SYAZWANI,

You can follow these general steps:

Set Up Excel Application Scope:

Use the `Excel Application Scope| activity to specify the workbook where you want to log the actions.

Perform Deletion Action:

Implement the activity that simulates the click on the “Delete” button.
Get Current DateTime:

Use the Assign activity to get the current date and time:

CurrentTime = Now.ToString("yyyy-MM-dd HH:mm:ss")

Add Data Row:

You need a DataTable to store the logs before writing them to Excel. Initialize the DataTable if it doesn’t exist. Use the Add Data Row activity to add a new row to the DataTable with the required information (ID and timestamp).

newRowArray = {recordID, CurrentTime}

Write Data to Excel:

After adding the new data row to the DataTable, use the Write Range activity to write the contents of the DataTable to the specified Excel sheet.

LLM helped me to write this but it’s validated by me.

Hi, thank you for the help! But in this automation there will be a DataTable which to saved all the ID, Name and etc for later deletion.

Then here we got Append Range Workbook, but when the debug/run ended, it shows empty sheet

@AZNI_SYAZWANI

I donot see a add datarow activity

also just to make sure this step is running add a breakpoint on append and check the datatable from locals panel and see if it has required data…then use step into and check if append range actually worked or not

cheers

I do have the Add Row Data, when the script RUN, there were no data append in the excel.

Thank you

@AZNI_SYAZWANI

I know there is one

Check if there are same variables declared with different scopes

Do a step into from there and keep a watch on variables panel for each step

Cheers

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