Open sangee2004 opened 1 month ago
Can you retest this with a better prompt that makes it clear you want it to write a formula?
(see my comment in the similar issue opened for google sheets)
I tried to create a new column which is a difference of existing 2 columns. The cell values got evaluated as expected , but it got created as new set of rows instead of appending a column to the existing rows.
Following is the content of the xlsheet:
Asked to create a new column which is a difference of existing 2 columns.
Content of xlsheet after update ( Rows from 26 are newly added rows)
Debug calls - calls (63).json
With prompt being changed to create a new column "difference" as the difference between "GrossPay" and "NetPay" and add it all existing rows
, i am able to get it to append columns to the existing rows.
In this case, I still see updateCellInSpreadsheet
being called multiple times (as many rows to update) which would mean that the actual calculation is still done my the LLM and not the Excel tool.
Is there a way for me to create a cell with a formula ?
Debug call - calls (64).json
Tried with - Create a column "Take Home" as a formula that subtracts "Gross Pay" and "Net pay" and add it to all existing rows
This results in new rows being added and formula not being used
Debug logs - calls (67).json
this feels like a mess. we might need to be more restrictive in what you can do with the spreadsheet tools
Steps to reproduce the problem:
1.Create an agent with github.com/gptscript-ai/tools/apis/excel/write
Chat with this agent and ask it to open an excel file with following format - mypay55.xlsx
Once it provides the details from this xlsheet, ask to
Add a new row with values for Gross Pay and Net Pay to be the total of corresponding column values from all the pervious rows
Notice that new rows with total gets added but is incorrect since the LLM's calculation is not acqurate. In this case , we should have support for tools that would allow us to create cells with formulas which will result in excel doing the right calculations.