从SSIS生成了excel,但是在每一列中都得到了报价? [英] generated excel from SSIS but getting quote in every column?

查看:41
本文介绍了从SSIS生成了excel,但是在每一列中都得到了报价?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地从SSIS包中生成了并表现出色.但是每列都有多余的'(引号)标记,为什么会这样?

I have generated and excel from SSIS package successfully. But every column is having extra ' (quote) mark why is it so?

我的源sql表如下所示

My source sql table is like below

Name    price    address
ashu    123      pune
jkl     34       UK

在我的 sql表中,我将 all column 作为 varchar(50)数据类型.在要创建表的 Excel Manager Excel Destination 将所有列都设为相同的 varchar(50)数据类型.

In my sql table i took all column as varchar(50) datatype. In Excel Manager when it is going to create table Excel Destination took all column as same varchar(50) datatype.

Data Flow 中,我使用了 Data Conversion Transformation 来防止 unicode 转换错误.

And in Data Flow I have used Data Conversion transformation to prevent unicode conversion error.

请提出建议,我需要进行更改以获取excel文件中的透明列.

Please advice where i need to change to get the clear columns in excel file.

推荐答案

您可以创建一个模板 Excel文件,在其中指定了所有列类型(从常规"更改为文本")和标题将需要.将其存储在/Template 目录中,并将其复制到SSIS包中您将需要的位置.

You could create a template Excel file in which you have specified all the column types (change to Text from General) and headers you will need. Store it in a /Template directory and have copy it over to where you will need it from within the SSIS package.

在您的SSIS包中:

  1. 使用脚本组件将Excel模板文件复制到所选目录中.
  2. 以编程方式更改其名称,并将整个文件路径存储在一个变量中,该变量将在相应的数据流任务"中使用.
  3. 将Expression Builder用于Excel Connection Manager.设置 ExcelFilePath 以从变量中检索.
  1. Use Script Component to copy Excel Template file into directory of choice.
  2. Programatically change its name and store the whole filepath in a variable that will be used in your corresponding Data Flow Task.
  3. Use Expression Builder for your Excel Connection Manager. Set the ExcelFilePath to be retrieved from your variable.

这篇关于从SSIS生成了excel,但是在每一列中都得到了报价?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆