Data Extraction - Repeat Action

Hello everyone, I would like to ask how can I extract the changing stock price in Excel for three minutes, as it keeps changing all the time, how can I record all the changes in Excel? Thanks for help

Hi

Hope the below steps would help you resolve this

  1. Use a assign activity like this
    counter = 0

Where counter is a variable of type int32

  1. Now use a BUILD DATATABLE activity and create a column named timestamp, stock (both of string type) and get the output as datatable named dt

  2. Then use a while loop activity and mention the condition as counter < 10

  3. Inside the loop use a GET TEXT ACTIVITY and indicate the stock number element and get the output as a string variable named Strinput

  4. Then use a ADD DATAROW activity and mention datatable as dt and ArrayRow as
    {Datetime.Now.ToString(“hh:mm:as”), Strinput.ToString}

  5. Use a delay activity with seconds u want

  6. And finally a assign activity inside the while loop like
    Counter = counter + 1

  7. Outside this while loop use a WRITE RANGE WORKBOOK activity and pass dt as input with add headers property enabled

Cheers @CHAN_Hiu_Fung_Victor_Stud

1 Like

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