[]
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.
void FromJson(string json)
Sub FromJson(json As String)
| Type | Name | Description |
|---|---|---|
| string | json | The JSON string that represents a shape. |
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);