万梅资源网 Design By www.ubjie.com
select *
from openrowset('Microsoft.Jet.OLEDB.4.0'
,'Excel 8.0;HDR=YES;IMEX=1;DATABASE=d:\folder\excel.xls',Sheet1$)
-------NOTE------
Setting IMEX=1 tells the driver to use Import mode. In this state, the registry setting ImportMixedTypes=Text will be noticed. This forces mixed data to be converted to text. For this to work reliably, you may also have to modify the registry setting, TypeGuessRows=8. The ISAM driver by default looks at the first eight rows and from that sampling determines the datatype. If this eight row sampling is all numeric, then setting IMEX=1 will not convert the default datatype to Text; it will remain numeric.
You must be careful that IMEX=1 not be used indiscriminately. This is IMPORT mode, so the results may be unpredictable if you try to do appends or updates of data in this mode.
The possible settings of IMEX are:
0 is Export mode
1 is Import mode
2 is Linked mode (full update capabilities)
from openrowset('Microsoft.Jet.OLEDB.4.0'
,'Excel 8.0;HDR=YES;IMEX=1;DATABASE=d:\folder\excel.xls',Sheet1$)
-------NOTE------
Setting IMEX=1 tells the driver to use Import mode. In this state, the registry setting ImportMixedTypes=Text will be noticed. This forces mixed data to be converted to text. For this to work reliably, you may also have to modify the registry setting, TypeGuessRows=8. The ISAM driver by default looks at the first eight rows and from that sampling determines the datatype. If this eight row sampling is all numeric, then setting IMEX=1 will not convert the default datatype to Text; it will remain numeric.
You must be careful that IMEX=1 not be used indiscriminately. This is IMPORT mode, so the results may be unpredictable if you try to do appends or updates of data in this mode.
The possible settings of IMEX are:
0 is Export mode
1 is Import mode
2 is Linked mode (full update capabilities)
万梅资源网 Design By www.ubjie.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
万梅资源网 Design By www.ubjie.com
暂无评论...
www.ubjie.com
万梅资源网
19,976影音资源
44,792技术资源
1,817软件资源
451,128站长资源
最新文章
友情链接
杰晶网络
DDR爱好者之家
桃源资源网
杰网资源
富贵资源网
南强小屋
铁雪资源网
幽灵资源网
万梅资源网
狼山资源网
白云岛资源网
昆仑资源网
相思资源网
明霞山资源网
内蒙古资源网
黑松山资源网
茶园资源网
饿虎岗资源网
大旗谷资源网
常春岛资源网
岱庙资源网
兴国资源网
快活林资源网
蝙蝠岛资源网
帝王谷资源网
白云城资源网
伏龙阁资源网
清风细雨楼
天枫庄资源网
圆月山庄资源网
无争山庄资源网
神水资源网
移花宫资源网
神剑山庄资源网
无为清净楼资源网
金钱帮资源网
丐帮资源网
华山资源网
极乐门资源网
小李飞刀资源网
凤求凰客栈
风云阁资源网
金狮镖局
鸳鸯亭资源网
千金楼资源网
更多链接
万梅资源网 Design By www.ubjie.com