'How to remove BOM (Byte Order Mark) in CSV export using visual studio SSRS 2017
When I export data to CSV file using SSRS 2017 I got BOM (Byte Order Mark) in the data. How can I get rid of it?
I tried the below link, but I cannot find rsreportserver.config
file
Solution 1:[1]
We added a new render in the :\Program Files\Microsoft Reporting Services\SSRS\Report Server\rsreportserver.config its in the selectable list of save options and you can rename it
<Extension Name="CSVASCII" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
<Configuration>
<DeviceInfo>
<Encoding>ASCII</Encoding>
</DeviceInfo>
</Configuration>
</Extension>
This forces ASCII encoding removing the BOM (ยด??)
We have others for XML and TEXT (PIPE "|") output, we found it better to add than to override.
Solution 2:[2]
Adam Marshall's answer above is right on. (Just note that you must add an </Extension>
closing tag at the end.)
On my server, the rsreportserver.config file was in this folder: C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Rob Schripsema |