很简单,使用opendatasource就可以实现了
insert into tablename
select * from opendatasource('Microsoft.Jet.OLEDB.4.0','Data Source="excel文件的具体位置";Extended properties=Excel 5.0')...Sheet名$
本文介绍了一种简单的方法,可以将Excel文件中的数据批量导入到数据库表中。通过使用opendatasource函数配合特定的OLE DB提供者,可以实现从Excel指定工作表中读取数据并插入到目标数据库表。
很简单,使用opendatasource就可以实现了
insert into tablename
select * from opendatasource('Microsoft.Jet.OLEDB.4.0','Data Source="excel文件的具体位置";Extended properties=Excel 5.0')...Sheet名$