Excel导入Sql Server数字导入问题解决

Excel导入Sql Server数字导入问题解决

1.将单元格格式设置为 常规
2.导入的sql语句

use test
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
go
SELECT * INTO spacefield
FROM OpenDataSource
('Microsoft.Jet.OLEDB.4.0','Data Source="D:\导入\spacefield.xls";Extended properties="Excel 5.0;HDR=Yes;IMEX=1;"')...['spacefield$']

3.通过实验,数值,文本导入之后都没问题了。

原文地址:https://www.cnblogs.com/stublue/p/1877634.html