简体   繁体   English

CSV 导出选项中的“EmptyHeader”?

[英]"EmptyHeader" in CSV Export Options?

I have a CSV file I am attempting to create, and the recipient requires a header row.我有一个正在尝试创建的 CSV 文件,收件人需要一个标题行。 In this header row (and in the data) there is a field that used to be present that was removed.在这个标题行(和数据)中有一个曾经存在的字段被删除了。 However, they did not remove the column that that held that data, so now, there is an empty column name surrounded by delimiters ("|").但是,他们没有删除保存该数据的列,因此现在有一个由分隔符(“|”)包围的空列名。 How can I recreate this?我怎样才能重新创建这个?

The expected results for the following columns should be:以下列的预期结果应该是:

RxType1|RxType2|RxType3|RxType4|RxType5||DelivID 

(There is an empty column between RxType5 and DelivID) and the results would be: (在 RxType5 和 DelivID 之间有一个空列),结果将是:

|Rx|OTC|Legend|Generic|Other||Express

I am using SSRS, and have attempted adding an extra pipe the the column header for RxType5 with an empty column behind it, but the CSV seems to generate a header row based on the column names from the stored procedure and not from the RDL data.我正在使用 SSRS,并尝试在 RxType5 的列标题中添加一个额外的管道,其后面有一个空列,但 CSV 似乎根据存储过程中的列名而不是 RDL 数据生成标题行。 I have also attempted in the Stored Proc to create the column by using:我还尝试在存储过程中使用以下方法创建列:

Select
'' AS ""

OR或者

'' AS "|"

but when I refresh the fields in SSRS, it puts that the column is called "ID_" (because a space, no character, or pipe is non-CLS compliant.但是当我刷新 SSRS 中的字段时,它会将该列称为“ID_”(因为空格、没有字符或管道不符合 CLS。

Any suggestions on how I can achieve this?关于如何实现这一目标的任何建议? Thanks so much :)非常感谢 :)

尝试使用已知名称创建列,例如SELECT '' AS [RemoveMe] ,然后从行标题文本框中删除该名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM