How can we add next date compare to excel latest date in excel

Hi Team,

I want to add the next date in excel compare to latest date in excel.

Actual:
image

Expected:
image

Appreciate your help!
@Palaniyappan @lakshman @sarathi125

1 Like

@RajeshT

Is excel file contains only one row of data ?

2 Likes

Hi @lakshman,

Its having multiple rows of data,based on latest date and last row need to add next date.

Regards,
Rajesh

1 Like

@RajeshT

  1. Use Read Range activity to read the data from excel file and will give output as DataTable. And then use ForEach Row activity to iterate one by one row.

            ForEach row in inputDT
                  int index = inputDT.Rows.IndexOf(row)+2
                  If CDate(row("Validation Date").Tostring).Tostring("dd/MM/yyyy").Equals(Now.Tostring("dd/MM/yyyy"))
                   Then use Write Cell activity and pass below values
                     Range: "A"+(index+1).Tostring
                      Value: Now.AddDays(1).ToString("dd/MM/yyyy")
2 Likes

Thank you @lakshman .
This code working for my scenario.

1 Like

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