极乐门资源网 Design By www.ioogu.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.ioogu.com
极乐门资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
极乐门资源网 Design By www.ioogu.com
暂无Select data from an Excel sheet in MSSQL的评论...
更新日志
2024年05月20日
2024年05月20日
- 雷普利 Ripley
- 燕云十六声卷二烈言所有宝箱位置一览
- 崩坏星穹铁道神秘人交给你的线索位置大全
- 少年西游记2众生轮回活动攻略 2个玩法解析
- 出发吧麦芬古遗迹上的幽影试炼怎么过 古遗迹上的幽影阵容打法攻略
- 出发吧麦芬三宝齐聚黄金船试炼怎么过 三宝齐聚黄金船阵容打法攻略
- 鸣潮渊武适配武器选什么 渊武四星五星武器推荐
- 618优选技嘉B760M冰雕X,纯白海景房装机小钢炮
- 《荒野大镖客:救赎》或将加入XGP和PS Premium
- 荒野之息 vs 王国之泪!IGN评选最佳Switch游戏TOP25
- 痛仰乐队.2017-今日青年【摩登天空】【WAV+CUE】
- 【柔顺爵士】Threestyle-2024-NoMatterWhat(FLAC)
- 马人乐团.2011-鞭风再起【喜玛拉雅】【WAV+CUE】
- 杨奇谈《黑神话:悟空》:感谢老师们几年来胸怀明月 休休有容
- 《黑神话:悟空》金箍首次亮相!疑致敬《大话西游》