Salesforce report formatting

You have been there. You create a Salesforce report with killer content only to be underwhelmed by the report formatting options in Salesforce itself. Some folks may have paid for add-ons to make the formatting of these reports more automated. You may be using Tableau to import the data and make the output more visual and elegant. You can try XL-Connector or G-Connector for Salesforce, which will allow you to retrieve your report right into Excel or Google Sheets, and keep the formatting consistent from retrieve to retrieve. I have had good luck with both of these.

Another approach I have used is also pretty simple — just use the power of whatever platform I want to create the “real” report. This may be as simple as opening up the CSV/Excel file that Salesforce exports. But I have come to do this so many times and not liked the format, so created a simple VBA script to prettify the output and create a pivot table while I am at it. The Visual Basic for Excel script pasted below will work regardless of your data structure or if all fields in the report are populated or have blank data. I have chosen to also format numeric fields and date fields based on the field name. You can adjust this based on your specific fields or needs. I am not expert in even this simple code but it gets the job done.

The script will turn this…

..into this (only subtle formatting changes)…

and create a pivot table for you:

Here is the script for Google Sheets. It does the same thing as described above for Excel. I have a bunch of these utility scripts for both Excel and Google that one day I will publish as add-ins when I get a chance.

Let me know what your approach has been to this annoying little reporting pain!

Finance professional passionate about technology and building scalable processes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store