Hi , i am trying to create an automatic Uipath studiox process that is able to update an excel sheet daily with stock prices from the internet. I would want it to be able to find the next empty row in the excel table to update the columns " Date" , current price of stock A , current price of stock B , current price of stock C.
I have managed to retrieve the 3 stock prices for yesterday 31/12/2020 from the website and wrote it into my excel sheet ( row 7).
However , i do not know how to get UiPath to find the next empty row in the table which contains column " Date" , current price of stock A , current price of stock B , current price of stock C. i.e., i want to run an automatic process to update today’s 1/1/2021 stock prices and date in row 8 of excel sheet and tomorrow’s stock prices and date in row 9 and so on.
After Click , i wrote Get Text followed by Write Cell into B7.
Basically i repeated the process for the other two stocks. Not sure if this could be done in a better way that allow me to automate it into the next empty row . Many thanks.
@msgoh
1)Build Datatable and then add the values to the datatable using “Add row” activity from 3 website one after the other
2)then finally write it to the excel sheet
[OR]
you can use read excel and assign it to the datatable(dt_sample) before “Write cell” Activity
Then in “write cell” Activity ->where to write - modify the value to “[portfolio]Sheet1!A”+(dt_sample.rows.count+1).Tostring
This will get the number of rows present in the excel and then write to the next row
Note:check if Header is included/not in the excel using the read activity and change the incremental accordingly.
HI Elina , i would like to utilise method 2 .
Could you help me to understand for point 1) , i will have to select “Read Cell Value” ? and place it above my “1.2 Write Cell” or to place it after i “Get Text” from the browser e.g., after 1.3.1.3 Get Text ?