Hi everyone,
I'm working on an App Inventor project where I need to send a formula to a Google Spreadsheet using the WriteRow function of the Spreadsheet component.
What I'm Trying to Do:
- I have a column for start date/time (Column E).
- I have a column for end date/time (Column F).
- In another column (Column G), I want to send a formula that calculates the time difference:
Example formula:=F2-E2(if the row index is 2). - The formula should dynamically update based on the row number.
How I'm Generating the Formula:
I tried using the join block to create the formula dynamically:
blocks:
set Formula_Celula to join "=" "F" global index "-E" global index
If global indexCliente = 2, this should create:
=F2-E2
Then, I add this formula to my list and send it using WriteRow:
The Problem:
Whenever I try to send this formula, I get the following error:
"4401 error in spreadsheet: WriteRow 400 Bad Request"
What I Tried:
- I checked that
global indexis a valid row number. - I used
Notifier1.ShowAlertto confirm thatFormula_Celulagenerates correctly (it does). - I tried adding
" "around the formula to ensure it's sent as text.

Questions:
- Is there a specific format required to send formulas with
WriteRow? - Does the Spreadsheet component block formulas?
- Is there a workaround to insert a formula dynamically into a new row?
Any help would be greatly appreciated! ![]()


