Once i had a requirement to exclude some columns when we export the SSRS report to excel. It was the business requirement to exclude those from excel as they only want the user to see some particular columns and rest of the columns were of no use for them as these columns were having only links to other sub reports.
So after searching for hours on Google, i found an expression to hide column in the exported excel report. Although that expression was not working but it gave me an idea where to start. I looked into the built-in fields and found RenderFormat.Name property.
After that it was really very simple to hide a column in the excel report.
Follow these steps:
1) Select the column you want to hide.
2) Right click on the column and select “Column visibility”
3) Select expression and input the following expression:
= (Globals!RenderFormat.Name = “EXCEL”)
When i exported the SSRS report into Excel, that column was not visible.
The same expression can be used to hide columns for other formats like CSV, Word, PDF etc.
d6fa2ab3-64fd-45cc-a33a-e91f18698b07|2|4.0