How to delete first column on a addition on new column

Hi @jack.chan and everyone

I have 8 columns in a excel file like this :

What I want to do is delete the first column when ever a new column is added So when A new column is added The excel should look like this

1 Like

Hi @Ishan_Shelke ,

If always the First Column is to be deleted then it would mean the range to be deleted would also always be on the same column A.

If that is the case, we could then use Delete Range Activity and then use the Range of rows to be deleted. Here we would also need to know the number of rows that should also be able to be retrieved using the Datatable from read range.

1 Like

@Ishan_Shelke ,

Hope you are doing well!

As per my understanding, when there is new column, you need to / robot need to delete first column.
Please checkout the xaml file (9.0 KB)

In case if you want to perform this task multiple times, you can schedule it run for multiple times.
I hope this help!. If your issue resolved, do mark it as solved so that it can help others!!

thanks and Regards,

Hi @Ishan_Shelke ,
For the output you desire inorder to achieve it with minimum human interaction you will need an Asset.
1)Whenever you read the column count of the excel just set the asset value using Set Asset activity .
2)Then in the process every time compare the asset value and current excel column count and if the asset value does not match with the current column count that time you have to use Remove data column activity and delete the column you want.
3)You can use a schedule trigger for this process and check the column count every 1 hour.
Or you can just update the asset value by set asset value activity only when there is a mismatch of asset value and excel column count.

I hope this helps you.

Thanks & Regards,
Shubham Dutta

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