Can create a script to update worksheet formula?

21 views
Skip to first unread message

Ryuya

unread,
Oct 1, 2022, 12:24:07 AMOct 1
to Google Apps Script Community
Hi there,

I am just wondering if we can create a script to update the cells with worksheet formula in order to get the latest information before apps script project gets executed?

I met an experience that my apps script project catches A1 cell to figure the recent number of people at the very beginning of the execution, it triggers every hour.
Last time I checked, the number in A1 was not the latest one so the execution did not go through..

Hope you can help me.

Thanks

CBMServices Web

unread,
Oct 1, 2022, 2:18:25 PMOct 1
to google-apps-sc...@googlegroups.com
There is a command which forces a spreadsheet update. You can try that to see if it helps. This is used usually to ensure spreadsheet does all the updates to the cells from the script itself but I think it can work for your case as well.

Use:

SpreadsheetApp.flush();

Before executing your main script code.


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/3adefb47-093e-425a-a3e1-2aa776c74dfdn%40googlegroups.com.

Ryuya Sakurai

unread,
Oct 2, 2022, 12:07:05 AMOct 2
to google-apps-sc...@googlegroups.com
Thanks for your advice. I'll give it a try.

Appreciate it.

2022年10月2日(日) 3:18 CBMServices Web <cbmserv...@gmail.com>:
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/HRxiFCiHSa0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAFX%2Bz3UN3oH0Rv4G1OgV6DWrxwtA8iFoL4172UzGjtzW2t_WbQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages