logo
search
Data Import & Export

How to Add Excel Comments to an SSRS Export Using Macros

Huda QurayshiHuda Qurayshi Sep 28, 2026 869 views

Question details

The user needs to automatically add comments to specific cells in an Excel file exported from SSRS, pulling the text for those comments from another data column.

How to Add Excel Comments to an SSRS Export
Product
Excel / SSRS
Device & OS
not provided
Scenario
A scheduled SSRS report exports data to Excel, and the user needs a non-legacy solution (moving away from SSIS and VBScript) to populate cell comments dynamically.
Observed behavior
SSRS does not natively support writing Excel cell comments on export, requiring a post-processing automation solution to read from a source column and add notes to a destination column.
Before you start

Before applying any macro or automation script, prepare a sample workbook containing dummy data to safely test the logic without exposing confidential information.

Solution 1Recommended

Use a Post-Processing VBA Macro

Since SSRS does not natively output Excel cell comments, use a VBA macro to loop through the exported dataset, copying values from a helper column into the target cells as comments.

This solution assumes that you include the comment text in a separate helper column within your SSRS report. Once the Excel file is generated, the macro processes the file, adds the comments, and hides or removes the helper column.

1
Open the VBA Editor

Open your exported SSRS Excel file. Press 'Alt + F11' to open the Microsoft Visual Basic for Applications (VBA) editor.

2
Insert a New Module

Click 'Insert' from the top menu, then select 'Module' to create a blank script window.

3
Write the Macro Logic

Paste a VBA script that loops through your active rows. Use the '.AddComment' method on your destination cell and set its text property to the value of your source column.

4
Run the Macro

Press 'F5' or click the 'Run' button. The macro will instantly populate the target cells with the corresponding notes from your helper column.

Use a Post-Processing VBA Macro
Automation Trigger: To fully automate this without manual clicks, consider using a PowerShell script or Office Scripts (if using Excel Online) to call this macro immediately after the SSRS export schedule runs.
Advanced Data Processing in WPS

Automate Data Exports and Macros in WPS Office

WPS Spreadsheet offers robust VBA and macro support, making it simple to process automated SSRS exports and dynamically manipulate cell comments.

  1. 1. Download and Install WPS Office: Get WPS Office for free and install it on your machine to handle spreadsheet automation.
  2. 2. Open Your SSRS Export: Launch WPS Spreadsheet and open the .xlsx file generated by your SSRS schedule.
  3. 3. Access the Developer Tools: Navigate to the 'Tools' tab on the ribbon and click 'Developer' to access the VBA editor.
  4. 4. Apply Your Post-Processing Script: Insert your script to map the data columns into cell comments and execute it to instantly update the report.
High compatibility with Microsoft Excel formats (.xlsx, .xls, .xlsm).Built-in VBA editor for running and managing automation scripts seamlessly.Lightweight and fast, ideal for handling large automated data exports.Free alternative to Microsoft Office for complex data processing tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Can SSRS natively render cell comments in Excel?

No, SSRS natively formats data into grid cells but does not have a built-in property to convert data fields into Excel cell comments or notes during the export phase.

What is a modern alternative to VBScript for automating Excel files?

If you are moving away from VBScript, you can utilize Python (with libraries like openpyxl), Office Scripts, or Power Automate to handle post-processing of Excel files generated by SSRS.

How do I hide the helper column after adding comments?

If using a VBA macro, you can add a line of code such as `Columns("E").Hidden = True` (replace "E" with your column letter) at the end of your script so the raw comment data is no longer visible on the report.