Calligra Sheets is a scriptable spreadsheet program which provides both table-oriented sheets and support for complex mathematical formulas and statistics.
Calligra Sheets comes with a flexible plugin-architektur based on the KDE KPart Component technology. This allows a clean separation between Calligra Sheets and it's plugins, enables reusing of plugins even outside of Calligra Sheets and is build upon a well proven technology.
Existing Calligra Sheets plugins are
The KSpread Scripting page provides an overview of scripting within KSpread (TODO: still applies to Calligra Sheets?)