从Excel读取数据时的数据类型/数据问题 [英] Datatype / Data Issue while reading data from Excel

查看:121
本文介绍了从Excel读取数据时的数据类型/数据问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的源文件样本数据如下所示

在我的ssis包中,我正在读取数据  :

In my ssis package I am reading data as  :

选择*来自[Emp $ B1:D4]

select * from [Emp$B1:D4]

注意:为简单起见,我已将数据复制到初始单元格中但它可以启动 在中间特定范围

Note : For simplicity I have copied data in initial cell but It can be starting  in Middle specific range

现在我的问题是在源数据中我得到NA,N / A或者 有时会出现一些公式错误。

Now my problem is that in Source data I am getting NA,N/A or  some formula error sometimes.

据我所知,默认情况下SSIS会将数据视为十进制。但是,每当有多个NA或N / A或其他公式错误时,多行它将数据类型转换为DT_WSTR。

I understand that by default SSIS consider data as Decimal.But, Whenever there are more than one NA or N/A or some other Formula error  in multiple row It is converting datatype as DT_WSTR.

作为解决方案的一部分,我在我的连接中包含IMEX = 1。但它仍然没有解决我的数据类型问题。

As a part of solution, I have included IMEX =1 in my connection.But It is not still resolving my datatype issue.

问题是我不理解我的包流,因为有时列将以Decimal和有时候是Nvarhcar。那么,我怎么能找到一些共同点?

Problem is that I don't understand my package flow , because sometimes columns are coming as Decimal and sometimes as Nvarhcar. So, how can I come on some common ground ?




推荐答案

嗨  Aminesh,

Hi Aminesh,

作为解决方案的一部分,我在我的连接中包含了IMEX = 1。但它仍然没有解决我的数据类型问题。

您能否告诉我您的数据类型问题是什么?

Could you please tell me what is your datatype issue?

我是否知道您是否要将列的所有数据类型从十进制转换为DT_WSTR?

May I know if you want to convert all data types of columns from decimal to DT_WSTR?

如果是这样,我们可以使用
数据转换转换

If so, we could use Data Conversion Transformation.

最好的问候,

Mona Lv


这篇关于从Excel读取数据时的数据类型/数据问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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