Support Portal

for ProcessRobot and WinAutomation

Start a new topic

Invoke web service and extract data from Json to Excel File


This example gives an idea on how to invoke a web service and extract particular data from the Json response, using regular expressions and store into Excel file.


1 person likes this idea

Any way to do it so the json output is interpreted into a table? This way we don't have to create one parse for each variable?


You can convert this Json output into custom object by using action called "Convert Json to Custom Object". Accordingly you can work on same object.

Thank You!

Maybe I'm missing it, but I'm still failing to see how to convert it into a table. For instance, so I can paste it into an excel file without having to code each individual variable. What I'm looking for, to put it simply, is to do the same thing you can do when you read data from a website table as a table and write it to excel. Maybe that can be done with the custom object, but I don't see it. Thoughts? I attached a crude sample output with only one row of data.


By using custom object and loop you can do that. Kindly refer attached screenshot.

1 person likes this

I was not able to import the Updated_Invoke web service and Parse response.waj file since I only have Professional. Could you provide a copy for Professional?

The sample provided gives an error when on Get Items Count.

John is correct, it give me an error too. Why are you not addressing the issue helpfully if you're going to make post supposedly helpful posts. PLEASE ADVISE

ERROR: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

   at Newtonsoft.Json.JsonTextReader.ParseValue()

   at Newtonsoft.Json.JsonTextReader.Read()

   at Newtonsoft.Json.Linq.JToken.ReadFrom(JsonReader reader, JsonLoadSettings settings)

   at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)

   at WinAutomation.Shared.Runtime.Variants.CustomObjectVariant.CreateFromJson(String json)

   at WinAutomation.Actions.Runtime.Variables.ConvertJsonToCustomObject(Variant json, Variant& customObject)

Login or Signup to post a comment