Removing comma

Friend, I am doing data scarpping for flipkart and found price is 17,333 so next want to make it normal 17333.00 but could not .
Tried syntax price.Remove(‘,’) but not worked

Use Replace
say
Price.Replace(“,”,“”)

2 Likes

hi @SUDHEER_DHAWAN1

Good to see back after a long time :slight_smile:

If you have the value stored in 17,333 in Value (string variable)

Do the value.replace(“,”,“”)

This will remove the “,” from the string variable

Hope this helps :smiley:

1 Like

@SUDHEER_DHAWAN1

welcome back

Check below post, It will remove all except alphanumeric and spaces

Hope this helps

Thanks

Dear Prathamesh

Thanks for response.
I have tried that one but its not working.
I had row(3) containing price that i am assigning in price according to your advice but its giving error.
Which is attached.Kindly call me if you have more query

Regards
Sudheer Dhawan
7838048025

Use row(3).Tostring.Replace(“,”,“”)

It work partially getting error

error is for data type conversion from string to datatable
where did you get this error can you share

Thanks I think its not working due to two reasons

It contains , and Rs symbol see like

2.row(“price”) and row(3) is part of datatable so directly not accepting toString

have tried
row(“price” or row(3) have

can you share workflow

@SUDHEER_DHAWAN1

Try with Regex Replace activity, by placing below expression

[^\w ]

Hope this helps

Thanks

Thanks for your concern,I am sending the file (Mobile_purchase.xaml)

DataScrapping_flipkart.zip (276 KB)

Hello try this in IF condition
Convert.toDouble(price.Substring(1))>19000.0

sir,
Thanks for supporting.

I tried both: Convert.toDouble(price.Substring(1))>19000.0 and Convert.toDouble(price)>19000.0 got error

I request you to compile my program please and fix the issue

DataScrapping_flipkart.zip (279 KB)

@SUDHEER_DHAWAN1 The Error points out that it is arising from the Attach Browser Activity and not the if Condition activity. I guess the Selector needs to be modified.

@SUDHEER_DHAWAN1 I made a bit of a Modification, instead of indicating the Flipkart website window, i used the Output of Open Browser as Input for the Attach Browser. I tried executing and it worked but since the results to be scraped where around 11,000 I stopped the scraping around 2000 :sweat_smile: but it should be working fine now. Check the Workflow :
DataScrapping_flipkart.zip (19.1 KB)

Dear Sir,Have you tested ?since attached code is still not working

Yes I have. It was working fine. What is the error that you get now?