Datatable is formatted incorrectly

I deserialized a json to a datatable and I’ve exported the datatable as excel and I find that this is the result. The result I would like is ordered so that “height”, “left”, “top” and “words” are column titles with the corresponding data being ordered below. Your help is very much appreciated.

Hi @kkarbassian

Share the JSON string sample

EmployeeData.json (412 Bytes)

By the Way, I used this activity to convert json to datatable: JSON / JArray Conversion Activities - RPA Component | UiPath Marketplace


In this case, the following will work.

dt = Newtonsoft.Json.JsonConvert.DeserializeObject(Of System.Data.DataTable)(System.Text.RegularExpressions.Regex.Match(strJson,"\[[\s\S]+\]").Value)

Note: Please install UiPath.WebAPI.Activities pacage via package manager.


1 Like

I aprreciate this a lot. Thanks very much

1 Like

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