Scrapping last 4 week data dynamically

Hi Folks, Hope you’re doing well

I need a small help from you guys in terms of logic/code

so in the picture, I have a grid of data with a data column & a value column

every week new value rows are added with a newer date

image

So each week whenever the bot will perform, how to scrape data for the last 4 weeks ??
Ps- The time format here is in DD-MM

Please help

Thanks

will there be datas for previous year in this table.In such case , how is this maintained?

in that portal current quarter’s data(i.e 4months) is available

in the screenshot, you can see the date = 5-13(This was may month’s data)

each week the new rows are kept on added

For example, now there will 3 more rows for June month

so how to pick, the last 4 weeks’ data always, that’s my query

you will have scrape the whole data and then filter the data table using date

Hello @Jiban_Kumar_Das

Is there any filter option available in the application to choose the month? If not you can extract the entire table using Table extraction and then use a filter to get only the required data.

Hey, there is no such filter, just a grid of data with the latest week as Rows

anyways
After scrapping the entire data
Can you tell me the expression i can use to filter only the last 4 weeks data

Thanks

DateTime.ParseExact(row(“date”).ToString,“dd-MM”, System.Globalization.CultureInfo.InvariantCulture)>Now.AddDays(-36)

1 Like

Hey

So using this i can get, the last 4 week’s row data? (irrespective of any date of any week)

yes…please try and let us now if you face any issues

New Microsoft Excel Worksheet.xlsx (8.8 KB)

Can you please try your code on this data & send me the XAML file, please


Hey
I tried, but this error is coming :confused:

Please let me know

Can you appnd year to the date in excel and use DateTime.ParseExact(row(“date”).ToString,“dd-MM-yyyy”, System.Globalization.CultureInfo.InvariantCulture)>Now.AddDays(-36)

How ?

Because from the portal we’re only scraping the date in MM-dd format
& that will be stored in the data table

You can append append year…

can you share the wf file whatever you have developed?

ClassiFlow.1.0.1.nupkg (9.2 KB)

Hey Here it is

Main.xaml (12.0 KB)
Can you try this?

No Mate, still the same issue

Is there any other workaround to filter last 4 week data

Or directly scrapping or last 4 weeks’ data row? please let me know

can you share the excel file as well?

Hi!

The system DateTime will takes as MM-dd-yyyy format. could you please provide the format which you’ve stored in the excel. so that will get to know.

and Date column from the excel is it string type or DateTime type?

Regards,
NaNi