So instead of a spreadsheet with a programming language, go the other way around!
http://pycells.pdxcb.net/
It's worked for the various things I've done with it, but as far as I know it's not maintained.
So instead of a spreadsheet with a programming language, go the other way around!