Hey i have an excel and i need to 2 things from it id and date

hey i have an excel and i need to 2 things from it id and date.

i have an excel that contains multiple columns
what i need whenever i am searching any date taking that input from user i need totall number of id generated till that day where date format will ex: 15/05/2019 23.59.59

1 Like

Buddy @manoj2500

Kindly follow the below steps that could resolve your issue buddy

  1. use excel application scope to open the excel
  2. use read range activity to read the data in excel and get the output as variable of type datatable named out_dt
  3. use a for each row loop to iterate through each row in the datatable with input passed as out_dt to the for eac row loop
  4. inside the loop use a if condition like this buddy
    Datetime.ParseExact(row(“columnname”), “dd/MM/yyyy HH:mm:ss”, System.Globalization.CultureInfo.InvariantCulture) <= Datetime.ParseExact(“Dateformatyouhave”, “dd/MM/yyyy HH:mm:ss”, System.Globalization.CultureInfo.InvariantCulture)
  5. This would fetch only the row wth that column having datetime till that date we mention
  6. use a counter in then part of if condition with default value of 0 and use a assign activity like this
    counter = counter + 1

Thats all buddy you will get the count atlast as output

Kindly try this and let know buddy whether this works or not buddy @manoj2500
Cheers