---
title: "Visually display status when looping through Google Sheets data with Google Apps Script"
author: "Martin Hawksey"
date: 2021-04-13T19:38:35+00:00
modified: 2021-04-13T19:44:17+00:00
canonical_url: https://pulse.appsscript.info/p/2021/04/visually-display-status-when-looping-through-google-sheets-data-with-google-apps-script/
markdown_url: https://pulse.appsscript.info/p/2021/04/visually-display-status-when-looping-through-google-sheets-data-with-google-apps-script.md
categories:
  - "Beginner"
  - "Sheets"
  - "Solutions"
tags:
  - "@schoraria911"
  - "script.gs"
featured_image: https://pulse.appsscript.info/files/2021/04/loop-through-rows-in-sheets.gif
description: "When working with small batches of data it can be useful to show the user that the data is being processed. Here is an example script from Sourabh Choraria which use SpreadsheetApp.flush() to force write updates to a Google Sheet"
---

# Visually display status when looping through Google Sheets data with Google Apps Script

![Visually display status when looping through Google Sheets data with Google Apps Script](https://pulse.appsscript.info/files/2021/04/loop-through-rows-in-sheets.gif)

> [https://script.gs/visually-display-status-when-looping-through-google-sheets-data/](https://script.gs/visually-display-status-when-looping-through-google-sheets-data/)
> show a processing status in a cell when looping through rows in google sheets using google apps script.

When working with small batches of data it can be useful to show the user that the data is being processed. Here is an example script from Sourabh Choraria which use `SpreadsheetApp.flush()` to force write updates to a Google Sheet. As this method relies on `.setValue()` instead of `.setValues()` it’s worth keeping in mind for bigger data sets that using HTMLService and a custom dialog or [`Speadsheet.toast()`**](https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet#toastmsg)

If the `.setValue()`/`.flush()` Al from coda has provided [this gist**](https://gist.github.com/al-codaio/417574ba781e28df78eb9fcc8526391f)

> To make this work, you need to add a Sparkline() function to your Google Sheet that references a hidden “For progress” column: [pic.twitter.com/jk87wvuuyj](https://t.co/jk87wvuuyj)
> — Al (@bigal123) [April 13, 2021](https://twitter.com/bigal123/status/1382038786222272517?ref_src=twsrc%5Etfw)

Source: *[visually display status when looping through google sheets data*](https://script.gs/visually-display-status-when-looping-through-google-sheets-data/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2021/04/visually-display-status-when-looping-through-google-sheets-data-with-google-apps-script/](https://pulse.appsscript.info/p/2021/04/visually-display-status-when-looping-through-google-sheets-data-with-google-apps-script/)*
