从SQL Server报表服务器导出非Unicode CSV

Ste*_*man 4 sql-server csv report reporting-services

我正在使用Microsoft SQL Server 2005中的SQL Server报表服务器.

在报表服务器报表查看器控件中,有一个CSV下载选项.CSV下载选项当前正在下载Unicode CSV文件,该文件无法使用正确的列格式加载到Microsoft Excel中.

如果我保存Unicode CSV文件并将其转换为ASCII文件,它在Excel中工作正常.

如何设置报告或SSRS报告查看器以将CSV导出为ASCII而不是Unicode?

在此先感谢您的帮助.

Nic*_*rum 6

转到RSReportserver.config文件(应位于reportserver虚拟目录的根目录中,例如" C:\ Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer ")

找到CSV扩展名 - 应该如下所示.将Encoding节点更改为读取ASCII而不是Unicode或whatevr.

        <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
            <Configuration>
                <DeviceInfo>
                    <Encoding>Unicode</Encoding>
                </DeviceInfo>
            </Configuration>
        </Extension>
Run Code Online (Sandbox Code Playgroud)