[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.JsonDataSource.-ctor

JsonDataSource Constructor

JsonDataSource(string)

Constructs a JSON data source from the specified JSON text.

Use this constructor to wrap JSON content in a JsonDataSource so it can be added as a template data source or bound to a worksheet.

Declaration
public JsonDataSource(string jsonText)
Public Sub New(jsonText As String)
Parameters
Type Name Description
string jsonText

The JSON text.

Examples
string jsonText = "[{\"student\":{\"name\":\"Jane\",\"score\":100}}]";
JsonDataSource dataSource = new JsonDataSource(jsonText);
workbook.AddDataSource("ds", dataSource);