When building AI agents, it doesn't end with just "making the LLM think." You eventually want to execute some kind of program ...
Make a Python function available in Calc, run it against the open spreadsheet, and troubleshoot missing macros or imports ...