[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IShape.FromJson

FromJson Method

FromJson(string)

Loads the shape from the specified JSON string.

Use ToJson() to generate a JSON string for a shape and apply it to another shape with this method.

Declaration
void FromJson(string json)
Sub FromJson(json As String)
Parameters
Type Name Description
string json

The JSON string that represents a shape.

Examples
IShape sourceShape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 120, 60);
sourceShape.TextFrame.TextRange.Text = "Hello";
string json = sourceShape.ToJson();
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 160, 20, 120, 60);
shape.FromJson(json);