Google-sheets – Temporarily disable autosave in Google Sheets

autohotkeygoogle sheetsgoogle-sheets-offline

I use autohotkey scripts for a lot of things in Google Sheets. It's basically scripted, automated keyboard input. A script may look something like this:

Loop, 4
{
    Loop, 7
    {
        Loop, %reps%
        {
            Send, {Enter}
            waitshort()
            Send, {Left}{Left}{Left}{Left}{Left}{Left}{Left}{Left}{Right}{Delete}
            waitshort()
            Send, %nextpage%
            Send, {Enter}
            waitshort()
        }
        Loop, %reps%
        {
            Send, {Up}
            waitshort()
        }
        Send, {Right}
        waitshort()
    }
    Send, {Right}
    waitShort()
}

I need it for repetitive tasks that you cannot do with standard Excel tools. The problem is Google Drive saves to cloud every minute or so. Whenever that happens Google Sheets lags for 2–3 seconds and all keyboard inputs are ignored. Which obviously means that the script gets interrupted and further input will be full of errors.

Is there a way to take a Google Sheets document offline for as long as a script is running? I have a script that needs to replace values across several thousand cells.

Best Answer

There is no way to disable autosave on Google Sheets. Instead of using autohotkey scripts use Google Sheets macros / Google Apps Scripts. For details see Automate tasks in Google Sheets and https://developers.google.com/apps-script/guides/sheets.

Regarding using Google Sheets offline, this requires to use Google Chrome. For details see Work on Google Docs, Sheets, & Slides offline