Backstop CRM: Beautify Excel Toolkit (ETK) Reports with VBA
If you have been using Backstop Report Builder and Excel Toolkit (ETK) to extract actionable insight out of the Backstop CRM platform, life ought to be pretty rosy.
Have you ever looked up the night sky and considered automagically beautifying the above-mentioned intel though? Self-serviced users would instantaneously generate freshest and highly formatted reports, alongside gorgeous charts without you lifting a finger.
Are you interested yet?
Before proceeding further, be forewarned this encounter assumes an intermediate/advanced comfort level with Excel and Visual Basic for Applications (VBA).
If the last sentence sounds like Latin, you may want to consider an Excel/VBA refresher first. Backstop Support Portal also has an extensive library on this topic, or send a love note to your Relationship Manager. Ours is Karina, and she is world-class!
The code is a little long. A brief overview adds clarity. The functions (aka subrountines) are modularized to maximize readability and maintainability. It looks way more beastly than reality!
The primary function that calls three (3) other functions. This is wired to run every time ETK refreshes data.
To ensure a clean slate, we remove pre-existing data and formatting options in the destination worksheet before each ETK refresh.
Bots are supposed to take away our jobs, right? Let them have the mundane chores then. This copies all refreshed ETK data to the destination worksheet.
The bulk of formatting chores are done within this function which invokes the following:
ETK returns both visible and hidden columns from the Report Builder. This function removes those columns not used in the final printable version.
Abbreviate values to enhance report readability based on a Dictionary object.
Rename column names. This could also be achieved globally within Entity Definition Manager or Report Builder. Doing so here spares us from affecting the spreadsheet anything else, except for this Excel file. Think global, shop local.
Apply numeric and date format options.
Add a nicely-formatted report title rapidly in first row.
These helper functions streamline repetitive low-level tasks.
Instantiate and return a WorkSheet object based on a friendly name.
Using a Dictionary to remap new column headings without affecting underlying data.
Using a Dictionary to remap new Closing Round values (e.g. First > 1st) without affecting underlying data.
Identify the last non-blank column (e.g. K).
Identify the last non-blank row (e.g. 168).
Identify the last non-blank cell (K168).
Identify the non-blank cell range (e.g. C2:K168)
Backstop User Conference (BUC) 2018
Want to see this live? This is a sneak preview of my upcoming BUC 2018 presentation: Client Success Showcase: Increase Efficiency in Backstop on June 7, 2018. I am extremely honored to be speaking and looking forward to meeting the Backstop family and friends!
Originally published at Kenneth Lo, PMP.