Progress bar

1,666 views
Skip to first unread message

Andrew Apell

unread,
Nov 4, 2020, 9:10:40 AM11/4/20
to Google Apps Script Community
How can I implement a progress bar in apps script?

Andrew Apell

unread,
Nov 4, 2020, 10:32:24 AM11/4/20
to Google Apps Script Community
My function is structured like this:

function myFunction () {
  // Some stuff here
  // Loop here
  // Process loop results here and return
}

This function is executed via a modal window

Laurie Nason

unread,
Nov 4, 2020, 11:26:29 PM11/4/20
to google-apps-sc...@googlegroups.com
https://www.claudiokuenzler.com/blog/954/how-to-create-visual-status-progress-bar-spreadsheet-google-sheets
You can use this on your sheet, then as you loop through your function, increase the value in the cell that the progress bar is based on - don't forget to SpreadsheetApp.flush() to force the redraw for the user (bear in mind that this may impact the users experience if you are doing a lot of small increments).


--
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/d6639fa4-3404-43af-86d0-a7535a62d2a1n%40googlegroups.com.


--

Laurie Nason 

The KAUST School – Operational Analyst

Information Technology Support
Deep in the Bowels of the School
Landline: +966-12-808-6853

Andrew Apell

unread,
Nov 5, 2020, 2:48:40 AM11/5/20
to Google Apps Script Community
👍  Thank you.

Andrew Roberts

unread,
Nov 5, 2020, 8:00:12 AM11/5/20
to google-apps-sc...@googlegroups.com
If the progress bar in client-side Materialize is handy: https://materializecss.com/preloader.html

Andrew Apell

unread,
Nov 5, 2020, 8:11:39 AM11/5/20
to Google Apps Script Community
Looks cool! Reduces the impact on processing as well...

Pablo Felip

unread,
Nov 13, 2020, 11:17:35 AM11/13/20
to Google Apps Script Community
I am also quite a fan of using SPARKLINE to give visual feedback in Google Sheets. This is a very simple implementation of a GAS-driven SPARKLINE to create progress bars, in case you may find it useful:

Andrew Apell

unread,
Dec 14, 2021, 9:23:38 AM12/14/21
to Google Apps Script Community
How do you implement "materialize" in Apps Script?

Jonathan Butler

unread,
Dec 14, 2021, 10:23:46 AM12/14/21
to google-apps-sc...@googlegroups.com
Add the CDN to your webpage. Create a Linear Determinate Progress bar, and update the width property in javascript.

Andrew Apell

unread,
Dec 14, 2021, 10:28:13 AM12/14/21
to Google Apps Script Community
Thanks Jonathan!
I couldn't find the CDN and that left me confused 🙂

Jonathan Butler

unread,
Dec 14, 2021, 10:35:47 AM12/14/21
to google-apps-sc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages