Minimal Google Apps Script (GAS) project intended to quickly transform a Google Sheet into a SQLite database.
Click here to create a copy of the demo Google Sheet (the required GAS code will also be copied).
- A Google Sheet to attach this Google Apps Script project to
These steps only need to be completed once.
- Create a new Google Sheet or create a copy of the demo Google Sheet.
- Go to
Extensions > Apps Script
to create a new Google Apps Script (GAS) project. The GAS project is automatically attached to the Google Sheet. - Copy
Code.gs
andsidebar.html
into the GAS project and save. If you copied the demo Google Sheet, this code should already be there.
If you use Backblaze as a storage provider, you can use the "Upload .sqlite3 file to Backblaze" button to upload the SQLite database directly to Backblaze.
This setup is NOT necessary if you only want to generate SQLite databases.
- In Backblaze, create a new application key with write access to the storage bucket where you want to upload the file to.
- Note the
keyID
andapplicationKey
shown. - In the GAS editor, create the following Google Apps Script properties (environment variables) under
Project Settings > Script Properties
:
BACKBLAZE_ID
- the Backblaze application key ID (keyId
) from step 5.BACKBLAZE_KEY
- the Backblaze application key (applicationKey
) from step 5.
- Refresh the Google Sheet and wait for the GAS code to finish loading.
- See the new custom menu button
🔥 sheets-db
. Press🔥 sheets-db > ❓ Help
for end-user instructions. - Press
🔥 sheets-db > 🟢 Start
to initialize the SQLite sidebar. - Click the buttons on the sidebar to generate the SQLite database and/or upload the file to Backblaze.
- Upload the .sqlite3 file to your favorite SQLite client (example: sqliteviz), to run queries on the database.