Hello,
I am trying to export custom JSON Data to an Excel template that has smart markers.
The idea is to have any kind of JSON structured data to be inserted in the Excel.
For Example:
{
"Title": "Friends",
"Persons": [
{
"Name": "Bob",
"Age": 30,
"Wife": {
"Name": "Jenna",
"Age": 28
}
},
{
"Name": "Gerald",
"Age": 43,
"Wife": {
"Name": "Anna",
"Age": 38
}
}
]
}
And the following in the Excel (see uploaded screenshot)
Screenshot 2022-11-05 at 12.42.34.png (15.0 KB)
&=Values.Persons.Name
I have tried multiple ways to set the Data source
dynamic values = JObject.Parse(valuesJson);
var values = JsonConvert.DeserializeObject<dynamic>(valuesJson);
designer.SetDataSource("Values", (object)values);
But every time the markers are not replaced with the actual data.
Can this use case be done without setting up Classes to serialize the JSON to ?
Thank you for the help !