In my case I had a column where some names were coming and they were linked to some external URL, this was fine and as required when rendered through report-viewer control on my web-application's page but when I export this to report PDF/Excel I didn't want them as then these links become non-functional and show error message like invalid URL.
I duplicated my column containing link, and removed action from newly created column. Now I set their visibility with below expressions.
Visibilty of column with action link associated:
=IIF(Globals!RenderFormat.Name = "PDF" Or Globals!RenderFormat.Name = "EXCEL", true, false)
Visibilty of column without action link associated:
=IIF(Globals!RenderFormat.Name = "PDF" Or Globals!RenderFormat.Name = "EXCEL", false, true)
Please consider: This might not work for older versions of SSRS
Hope this will save a few minutes of someone. If you have some better approach for this issue, please add it in comments and I'll update that in this post with due credits. Thanks.