本文介绍了将Excel电子表格导入MS Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
类似于此,我需要从Excel电子表格导入数据使用查询的新访问表
Similar to this post I need to import data from excel spreadsheet to a new access table using a query
是否有类似于此查询的导入到访问数据库的东西
Is there something similar to this query for importing to access database
INSERT INTO [tblTemp] ([Column1], [Column2], [Column3], [Column4])
SELECT A.[Column1], A.[Column2], A.[Column3], A.[Column4]
FROM OPENROWSET
('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\Excel.xls;HDR=YES', 'select * from [Sheet1$]') AS A;
推荐答案
您可以使用这样的查询:
You can use query like this:
SELECT [Column1], [Column2], [Column3], [Column4]
INTO [tblTemp]
FROM [Worsheet1$A2:D122] IN 'D:\Excel.xls' [Excel 8.0;HDR=YES;IMEX=0]
WHERE [Column1] is Not Null;
这篇关于将Excel电子表格导入MS Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!