r/GoogleAppsScript • u/Rich-Computer-6785 • 12d ago
Guide I built an open-source collection-based API for Google Sheets in Google Apps Script
Hi everyone!
I've been working on a small open-source project called Sheet Collection, and I thought it would be interesting to share it with this community.
The idea came from wanting a cleaner way to work with Google Sheets in Apps Script.
Instead of constantly dealing with spreadsheet ranges, row indexes, and manually mapping headers, the library provides a collection-based API that lets you work with spreadsheet data as JavaScript objects.
For example:
const db = SheetCollection.connect({
source: "google"
});
const clients = db.collection("clients");
clients.insert({
name: "John Doe",
email: "john@email.com"
});
const allClients = clients.findAll();Some of its features include:
- Collection-based API
- CRUD operations
- Automatic header management
- Google Sheets storage driver
- In-memory driver for testing
- TypeScript API
- Zero runtime dependencies
It's available as a Google Apps Script Library, and the project is open source under the MIT license.
GitHub: https://github.com/EduardoRadieske/sheet-collection
I'd love to hear your thoughts!
I'm particularly interested in feedback from people who regularly build applications using Google Apps Script and Google Sheets.
Thanks!
1
u/LostHusband_ 11d ago
Is it faster than interfacing a large sheet (7k rows across 70 columns) or if it just easier to deal with?