Convert response body into excel

I want to write this data into excel can someone please help…
MicrosoftTeams-image (13)


Its a json …do first use deserialize json and select type as jarray as I see a jarray first

Then use jarr(0)("ClientNumber").ToString to get the clientnumber and so on

Which can then be wrriten to datatable using add datarow



Hi @Bhushan_Nagaonkar

The code below will help you to convert a JSON string to a DataTable. Instead of using the “jsonString” variable in the code, you can pass your own JSON string variable by using the Assign activity

dt1 = CType(JsonConvert.DeserializeObject(jsonString, (GetType(DataTable))), DataTable)

Hi @Bhushan_Nagaonkar ,

Could you let us know the data format in the text file ? Is it in the form of a Json Array like below :

If so, we could use the Deserialize Json Array activity and get the JArray as output and use this to directly convert to a Datatable :

Expression used :

Newtonsoft.Json.JsonConvert.DeserializeObject(Of Datatable)(jArr.ToString)

Here, jArr is the Output of Deserialize Json Array Activity.

Visuals :

Let us know if this is not the expected approach you were looking for and provide us more details on the samples json data

1 Like

Thankyou for the solution. It has helped a lot

Thankyou so much

Thankyou so much for your response

1 Like

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