Update Excel Record

Hi,

I want to update my excel record based on the status
image

I have column A and Column B
if Column A is ACTIVE then I must update the Column B and Write/Change the status to “UPDATED”
if Column A have “Inactive” record I must remove the entire Row.

How can i do it?

Hi @Vincent_Nuestro

Read the data from excel and store it in a datatable.

image

use invoke code activity and click Edit Arguments,

click edit code and paste this code,

foreach(System.Data.DataRow dtRow in dt1.Select("[Column A] <> 'Inactive' "))
{
	if(dtRow["Column A"].ToString().ToUpper().Trim() == "ACTIVE")
	{
		dtRow["Column B"] = "Updated";
	}
}

select CSharp from invoke code property

and at last use write range activity to write the datatable.

Thanks

1 Like

I did something like that in my process. However, I had used an template excel and i created a conditional formatting formula in excel side. I assume this is the easiest way

@Vincent_Nuestro,

Can you use attached file made for you?
ExcelManipulation.xaml (8.7 KB)

Output as follows,
image

@Pankaj.Patil H sir, May i Ask what Activity or package did you used?
image

I cant open the activity

@Vincent_Nuestro,

I am using very latest.
Plz update from manage packages.

@Vincent_Nuestro

Have you tried my method…

Thanks

Hi Sir, I tried but my i cant change to CSharp property