How to get dynamic value from the excel

Hi,
Im attaching one excel along with this, from that date column how can i fetch the values dynamically. Now im using hardcoded values, but I want is to get dynamically.
Excel_Task.xlsx (9.2 KB)
.
Can anyone please help me to solve this issue.

@Chippy_Kolot

What do you mean dynamically?

Thanks,
Srini

Hi @Chippy_Kolot ,

Could you explain a bit more as to what you want to perform in terms of what should be the Output for this input?

This excel is one of the daily status excel. Here Im doing automation for that, I want to check whether date is equal to “01-02-2023” this date(“01-02-2023”)is taking from the column date in the excel. Here im passing values(date) directly(hardcoding),Instead of that how can i get those values from that column, Values are dynamic, dates can change depends up on month.

Hi @Chippy_Kolot

If you want to compare the data dynamically, you can do this inside the loop:

if - row("Date").ToString = Now.ToString("dd-MM-yyyy") then - your logic.

This will give compare the date column with the current date.

Hope this helps,
Best Regards.

Hi,
This is to read entire data from column date, but here I want to get date by date …Instead of taking all date in single shot. First I want date as “01-02-2023” ,Other than hardcoding (Instead of writting 01-02-2023 directly )How can I do that,

@Chippy_Kolot

Can you share the sample output you are referring to?

Thanks,
Srini

Excel_Task.xlsx (9.5 KB)

From the date column I need to get date one by one ,If we are providing row(“Date”).ToString it will takes all the dates together, Instead of that what I can do for getting date one by one.

@Chippy_Kolot

Try to use Filter Datatable and pass the correct date format
So, that the records will be filtered and only that date you can able to see

Hope this may help you

Thanks,
Srini

@Chippy_Kolot

If you just want to take the unique value based on the ‘Date’ column, then you can use the following query:

updatedDt = dt.DefaultView.ToTable(true,"Date")

This will only take the unique entries from the Date column.

Hope this helps,
Best Regards.

1 Like

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