SpreadJS 13
GC.Spread.Sheets.Shapes Namespace / GroupShape type / setFormula Method
The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate".
The formula string.
In This Topic
    setFormula Method
    In This Topic
    Sets the formula string to the shape by the path.
    Syntax
    var instance = new GC.Spread.Sheets.Shapes.GroupShape(worksheet, name);
    var value; // Type: any
    value = instance.setFormula(path, formula);
    function setFormula( 
       path : string,
       formula : string
    ) : any;

    Parameters

    path
    The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate".
    formula
    The formula string.
    Example
    sheet.name("Sheet1");
    sheet.setValue(0, 1, 30);
    var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
    var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
    var shape = sheet.shapes.group([shape1, shape2]);
    shape.setFormula("rotate", "=Sheet1!B1");
    See Also

    Reference

    GroupShape type