Need help on a Design of Excel Automation

Hi All,

I want to extract data from NSE Stock and save it in a datatable and create an excel output for the same.
I’m stuck in a design where I want users to select particular stock that should display the change % in the stocks via message box.

|SYMBOL | LTP | %CHNG| VOLUME|
|TATACONSUM| 881.05| 4.11| 36,18,782|
|DIVISLAB | 3706.65| 1.77| 4,07,338|
|BHARTIARTL | 879.95| 1.62| 42,35,096|
|HDFCBANK | 1599| 1.53| 2,81,60,455|
|BRITANNIA | 4579.8| 1.44| 3,00,673|

This is the extracted data.

If a user selects “TATACONSUM” bot has to display its % change in message box
Please help me to achieve this.
Thanks in advance.

Regards,
Dev

Hey to extract and store it by you using GET text or CV Get Text activity

Then add a For Each row in datatable
And add a message box and its input should be
CurrentRow(“%CHNG”).toString

Hope it helps you!

Hi Vikas,

Thanks for the support.

My requirement is that user has to select the Stock Name(Symbol Column) and it should give the %CHNG in message box.

I have used Input Dialog to get the user’s input Not sure on how to display %CHNG in message box.

Hey @devanand.1292
After taking the user Input
Use the browser activities to navigate into that company stocks
Use get text or CV GET TEXT To extract the %CHNG

Use a message box to output the get text output variable

Hope it helps you out!

Please find the steps below.

  • Launch website → NSE Stocks
  • Extract Live Stocks Data into datatable using Data Scrapping
  • Save it in an excel (output)
  • Get user input “SYMBOL” using Input dialog and display the %CHNG in message box.

I have to write a logic → If a user selects particular name from “Symbol Column” eg: TATACONSUM, bot has to display its %CHNG (4.11) in message box.

Please help.

@devanand.1292

hi

can you make the two columns in to a dictionary

dict_vales=datatable.Asenumerable.todictionary(function(x) x(“columnName”).tostring,function(r) r(“columnName”).tostring)

columnNames are SYMBOL, %CHNG

you will get the value by passing like this

assign
output=dict_values(“TATACONSUM”).tostring

you will get output as 4.11

1 Like

Hey @devanand.1292 ,
For Each Row (Loop through dtStocks)

  • If row(“SYMBOL”).ToString = symbolInput
    • Assign: percentageChange = row(“%CHNG”).ToString
    • Message Box: Display percentageChange

Hope it helps you!

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