/*
ACCESS与EXCEL文件的互导
一、将表导出为EXCEL07-2003表:
Select * INTO [EXCEL 8.0;DATABASE=E:TEMPinfo.XLS].info
FROM Sheet2;
二、将表导出为EXCEL2007/2010表(二进制):
Select * INTO [EXCEL 12.0;DATABASE=E:TEMPinfo.XLSB]. info
FROM Sheet2;
三、将表导出为EXCEL2007/2010表(XML):
Select * INTO [EXCEL 12.0 XML;DATABASE=E:temptext.xlsx].sheet1 FROM Sheet2;
四、将EXCEL表导入到现有表中:
Insert INTO ABC Select * FROM [EXCEL 12.0 XML;DATABASE=E:temptext.xlsx].sheet1;
五、导入EXCEL表并生成新表:
Select * INTO ABC FROM [EXCEL 12.0 XML;DATABASE=E:temptext.xlsx].sheet1;
*/
conn:=ComObjCreate("ADODB.connection")
connectionStrings := "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" A_ScriptDir "testTestDB.mdb"
conn.Open(connectionStrings)
Sql:="Select * INTO test4 FROM [Excel 12.0 Xml;HDR=YES;DATABASE=X:AHKCSVtest.xls].[Sheet1$];"
conn.execute(Sql)
conn.Close
conn:=
return
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.e1idc.net