Hi team,
I want to replace “-46546” this string in excel with “P0” string.
This string will be present in row(0) in excel on multiple times.
Regards,
sushant
Hi team,
I want to replace “-46546” this string in excel with “P0” string.
This string will be present in row(0) in excel on multiple times.
Regards,
sushant
Hi @sshitol
If you can install package “BalaReva.Excel.Sheets.FindReplace”, then it will be easy for you to find/replace
Hi @sshitol
Use the below steps…
If row(0).ToString.Equals(“-46546”)
This condition will check if complete row(0) is equal to “-46546” and not part of the string per the requirement.
Moreover,
this assignment will replace all of the string in row(0) with P0, instead of part of it, incase it finds a matching string “-46546”.
Please correct me if Iam wrong.
Oh yeah… thanks for pointing it out ![]()
Yep… it will check the whole string for the value. So if we want to see if the string contains the value somewhere… we can use below
Row(0).ToString.Contains(“-46546”)
Yep… correct… so for that we can use string replace
Row(0) = Row(0).ToString.Replace(“-46546”,“P0”)
Thanks again bro for correcting ![]()
@Lahiru.Fernando Thanks man.![]()