You might expect that creating an Excel file in Salesforce would be easy — perhaps even supported natively. But as with many things in the life of a Salesforce consultant, it’s often not that simple. In general, you have three options for exporting Excel files: Do it in the frontend Do it in the backend (Apex) Do it ou>sforce altogether When to Use the Frontend Approach The frontend (JavaScript-based) method is ideal when: You don’t need to store the file in Salesforce You want to avoid hitting Apex CPU or heap size limits You want an easy, lightweight solution All you need is a JavaScript file with a library like ExcelJS uploaded as a static resource. It’s straightforward, efficient, and avoids unnecessary backend processing. When to Use the Backend Approach If you need to store the file in Salesforce, generate it on a schedule, or integrate with server-side logic , then Apex is your go-to. Here's a good example using Apex and ZIP-based Excel file reading: Sal...
Salesforce CRM Analytics unfortunately doesn't provide a histogram widget out of the box. However, it is possible to use column chart to achieve acceptable results. Additionally, I will explain how to calculate the average price per Product and country, or per Product and Account . For how much are we actually selling? It is not uncommon to offer a discount to a potential client in order to win an Opportunity . When doing so, sales managers are interested in seeing the actual prices at which products are sold as well as the average price of the product sold in the country and to the same client in the past. To be able to follow the steps below, you need to have Salesforce CPQ installed on your org. Average price per country Let’s start with calculating average price. For this we will use Net Value on the Quote Line related to Accepted Quotes . First, we will prepare the Quote Lines . Open Data Manager and add following objects to Connections : Ac...