Loop through columns and dynamically get column number
Hi Team!
for my current robot I need to get data table from the website (this is the website: https://www.bnr.ro/Exchange-rates-1224.aspx) and extract values from column where column name is yesterday’s day. It will not be a fixed column number or column name.
I was wondering if you have any best practices how to extract data from data table where column name is a variable?
Many thanks for helping!
Page 1 / 1
Hi @Kasia 8214 ,
Do you need to extract data from all available column or from any specific one?
Hi @Padmakumar,
only specific column - column named with yesterday’s date
thanks!
Hi @Padmakumar,
only specific column - column named with today date
thanks!
If it is coming like this all the time, then you can go with the Index number right? Means, last column will always going to be the previous day data.
My bad! Apologies, yesterday date :)
Hi @Padmakumar
I find it a bit risky to take last column, for example if my bot gets delayed because of queue of robots in production and new set of data will be already published on the page, I want to take data from the correct column
Hi @Padmakumar
I find it a bit risky to take last column, for example if my bot gets delayed because of queue of robots in production and new set of data will be already published on the page, I want to take data from the correct column
Hi @Padmakumar
I find it a bit risky to take last column, for example if my bot gets delayed because of queue of robots in production and new set of data will be already published on the page, I want to take data from the correct column
You can extract the table and save the data into an excel file. Later using Database action and SELECT query, look for the column with previous day date (Before this, you should assign a variable and save the previous day date with the same format which is available in the portal) and extract the exchange rates from it.