Posted 27 August 2026, 6:08 am EST
Hi,
Yes, this is possible in SpreadJS — no future release needed.
You can link any shape property, including its text, to a cell using setFormula(). For your scenario:
var sheet = spread.getActiveSheet();
sheet.setFormula(3, 6, "=PI()"); // G4
var rect = sheet.shapes.add("rect1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 50, 150, 80);
rect.setFormula("text", "=Sheet1!G4");
The shape’s displayed text will now track whatever G4 evaluates to (3.14159…), and the link stays with the shape when you drag it around, just like Excel’s shape-to-cell linking.
A few things worth knowing:
This isn’t limited to text — setFormula() works on most shape properties (position, size, fill color, border, font, etc.), so you can drive an entire dashboard shape’s appearance from cell values.
If the formula you link to text is a plain cell reference (e.g. =Sheet1!G4), that link is preserved when exporting to Excel.
This works for both built-in shapes and custom shapes.
You can see a live example here: https://developer.mescius.com/spreadjs/demos/features/shapes/shape-with-formula/purejs
Docs reference (Shape Property Formulas):
https://developer.mescius.com/spreadjs/docs/features/UnderstandingShapes/AddingShapeswithFormulas
Regards,
Priyam