Hi everyone,
I’ve developed a complex Google Workspace/Spreadsheet system for my small business, and I’m looking for advice on whether I’m approaching it the right way, or if there are better methods to optimize and streamline this workflow. I've run this through AI to hopefully make it more readable.
Project Scope:Main purpose: It manages our quoting system, creating and sending quotes to customers (as PDFs) and generating CSV files for direct import into QuickBooks Desktop.
Scale: Over the past few years, it has grown into a huge project—currently around 8,000 lines of code, with multiple users working with these spreadsheets daily.
Data volume: We process over 100 quotes weekly, each containing detailed customer and order data, generating 75-column CSV files for every approved job.
Main spreadsheet: Users interact with a spreadsheet that has 38 hidden sheets and 4 visible ones, handling all logic for quoting, line items, and customer data.
7 database spreadsheets: These manage data like users, customers, inventory, and pricing. Some are read-only via importRange(), others are written to using SpreadsheetApp.openByUrl(), and a few are used both ways.
Multiple users: Each user in the office has their own copy of the main spreadsheet. I roll out a new version every few months. Users select their details using a dropdown, which are then stored for use during the quoting process.
UI: I use a mix of sidebars, modal dialogs, and standard spreadsheet cells with dropdowns. Most user interaction happens on a single sheet, avoiding the need for scrolling.
Users create or select customers and line items, pulling data from linked databases.
Quotes are generated, emailed to customers via GmailApp(), and saved as CSV files (75 columns) to Google Drive. Each quote is logged in a database with its status as "Quote."
Once a quote is approved, the data is re-imported for final production notes and resaved as needed. The status is updated to "In Production" in the log.
After production, the CSV file is imported into QuickBooks Desktop via a 3rd party app (Google Drive for Desktop conveniently syncs the files to a local folder).
Script authorization: Each time a new spreadsheet version is rolled out, users have difficulty with authorizing the script and initializing importRange().
Spreadsheet breakage: Despite locking down most sheets, users sometimes break their copies by dragging cells or overwriting formulas, requiring a replacement spreadsheet.
Speed: Performance is a significant issue. For example, opening a file takes about 7 seconds, and initiating production takes around 16 seconds. These delays, while manageable, can become frustrating during busy periods.
I’m not a professional developer—this project has grown organically as I’ve learned Google Apps Script and adapted the system to fit our evolving needs. My main concerns are scalability, long-term maintainability, and optimization (I’m at the mercy of Google).
I’d love to hear if this is the best way to manage a project of this size. Ideally, I’d like to convert it into a full-fledged web app hosted on my own domain, but for now, Google Apps Script is extremely convenient due to its integration with Drive, Gmail, etc.
Sounds pretty impressive if you ask me. Lots of work there for sure. Obviously there are better database systems but they would require you to learn additional languages such as Python or MySQL etc. or hiring someone to create it. So, staying with the current eco system I would suggest the following;
Instead of user spreadsheets, create a web app in app script and deploy it incorporating a login process for your specified users only. The coding required for this is fully within apps, script and very similar to your sidebar scripting and modal dialogue scripting. So the learning curve isn't significant and there are many tutorials on how to do this on YouTube. Additionally, there are many that could assist you with this less expensively because it is a fairly easy process within apps script itself. Certainly less expensive than some other programming languages and trying to incorporate them into a database system.
This would completely eliminate breakage of spreadsheets as well as users having to give permissions to use both the sheet and import range.
Saleability? Don't buy a trucking company to accommodate a volume that UPS could handle. How much bigger do you anticipate getting? Google has a per spreadsheet cell limit of 10,000,000 cells. Will any one database exceed this hard stop?
Multiple open shared spreadsheets with multiple users accessing the same data ... Google gets a little wonky. This functions better with a web app scenario.
Your code might be able to be optimized - without seeing it it's impossible to know. Obvious point is to make sure calls to the sheet(s) are kept to a minimum and. This is a balance between hard coding variables and dynamically needed variables. Also, which iterating process (loops) you use could affect time significantly. Also, too many importranges can really stall a sheets performance.
Not intimately knowing your process or data extent and volume - I can only generalize. Forgive me if you've already addressed some of my points. I do believe that any time/ energy you commit to an app script web app will pay significant dividends in the short term for you.
Hope that helps some.
Cheers
Keith
--
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/16ab4535-2229-495d-bfdb-9b7378fb7895n%40googlegroups.com.
Sounds like scalability isn't an issue at present and separating data is an option for future consideration. I.e. current and archived.
As to storage - I would prefer Spreadsheet for ease of use/access. Perhaps csv for archiving or backups.
Excellent idea on PropertyServices for variables. Couple ideas on that.
Let's say you need values from cells A2, B6, G7, K12 and Q10 to be used in various functions and calculations. Instead of a getRange("").getValue() for each, create a helper cell that joins them all in one cell. I.e. =join(",", A2, B7, G7, K12,Q10). Then make one call to this helper cell and gather them all at once into an app script variable and turn it into an array for easy reference in any function.
Return it to a string and store one user variable in userPropertysservice containing all variables to be used in functions.
This has an added benefit of helping not reaching limits on spreadsheet calls.
I'm gonna think a little on the HTML vs PDF question.
That's the thoughts for now.
Cheers
Keith
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/776a398a-7adb-49fd-bd9d-b502e57aed2fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/05e51ab6-9f64-49b8-b49e-ba25ae68c358n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/9f41e48f-1188-4031-8020-0cc710f69444n%40googlegroups.com.