Smart markers from dynamic objects

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 !

@JulianSch,

Thanks for the screenshot and details.

You may directly import JSON data into Excel spreadsheet via ImportData method, see the document with example code for your reference. Also, see another convert JSON to Excel document for further reference.

Regarding Smart Markers, could you please share a standalone sample console application (source code without compilation errors), JSON data file and sample files (e.g., input Excel file and output Excel file) to reproduce the issue. We will check your issue soon.

PS. please zip the files prior attaching.