Hi
Is there any way to convert this cell value from - “[
{
““value””: ““Waterproof””,
““label””: ““Waterproof””
}
]”
in excel to “Waterproof” and I want to do it in Bulk for each row in one go.
Regards
Naman
Hi
Is there any way to convert this cell value from - “[
{
““value””: ““Waterproof””,
““label””: ““Waterproof””
}
]”
in excel to “Waterproof” and I want to do it in Bulk for each row in one go.
Regards
Naman
Hey @Naman_Arora
I think the easiest way will be:
@Naman_Arora
For Each Row In DataTable
Deserialize JSON
Input: row(“YourColumnName”).ToString()
Output: jsonResult (JsonObject)
Assign
value = jsonResult(0)("value").ToString()
Write Cell or Write Range
Cell: row("YourColumnName").ColumnName + "_Result" (or a new column)
Value: value
I’m Getting this error.
Can anyone or you share the workflow example for better understanding ?
Regards
Naman
@Naman_Arora
here you will find example workflow.
BlankProcess111.zip (8.8 KB)
It is correct expression:
Newtonsoft.Json.Linq.JArray.Parse(currentRow("YourColumnName").ToString)(0)("value").ToString()
@Naman_Arora
This project is working fine. Maybe we have different version of Studio ¯_(ツ)_/¯
Anyway.
import this:
and use
Newtonsoft.Json.Linq.JArray.Parse(currentRow("YourColumnName").ToString)(0)("value").ToString()
like on my screenshot:
1. Using Text Manipulation Techniques:*
Assuming all cells have a similar structure as the example, here’s a method using string extraction and removal:
updatedValue = row(“YourColumnName”).ToString.Substring(row(“YourColumnName”).ToString.IndexOf(“:”) + 3, 11)
Replace Cell Value:* Update the current row with:
row(“YourColumnName”) = updatedValue
Bot works fine with the steps you shared. But when bot completes it’s execution. I got this error.
Am I getting this error because the column has some blank rows as well ?
@Naman_Arora
try to use if activity:
Not String.IsNullOrWhiteSpace(currentRow("YourColumnName").ToString)
Hi ,
The error message “Error reading JArray from JsonReader. Path ‘’, line 0, position 0.” suggests that there is an issue with parsing the JSON data. This error typically occurs when the JSON data is malformed, missing, or not properly formatted as a JSON array.
[
and end with ]
for a JSON array. Each JSON object within the array should be enclosed in curly braces {}
and separated by commas."{\"value\": \"Waterproof\"}"
.JArray.Parse
) and not for a JSON object (JObject.Parse
).