金狮镖局 Design By www.egabc.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.egabc.com
金狮镖局
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
金狮镖局 Design By www.egabc.com
暂无Select data from an Excel sheet in MSSQL的评论...
更新日志
2024年05月20日
2024年05月20日
- 出发吧麦芬噩兆降临之谷试炼怎么过 噩兆降临之谷阵容打法攻略
- 《黑神话:悟空》定价268元,8月20日同步上线WeGame!
- 博主称《七龙珠:电光炸裂!ZERO》或将在10月发售
- 《星期一的丰满》:新角色“热波师”变阿黑颜!?
- 张琍敏1986-群星会29[台湾版][WAV+CUE]
- 张宇《雨一直下》台首版[WAV整轨]
- 叶蕴仪1990-原宿[日本版][WAV+CUE]
- 看《庆余年2》腾讯SVIP被指VIP套娃 客服:所有用户都有广告的
- 刘畊宏脚踝受伤坐轮椅:暂时不能带大家跳操了
- 《燕云十六声》优美舞蹈幕后揭秘 国家级大师助力呈现
- 群星《2005香港高级视听展纪念大碟 SACD 》[DFF][1.9G]
- 王杰《同名精选辑》引进首版 首创[WAV+CUE][826M]
- 群星《爱情101情歌101延续篇 牵动心灵的情歌》6CD[WAV+CUE][4.2G]
- 【原神】璃月特产“人间美味”绝云椒椒的收集(58)
- 无相之草BOSS怎么打?无相草打法攻略