IMPORT FROM D:\原表.xls TYPE XL5
COPY TO TEST.DBF FOR RECNO()> 1
GO TOP
lnFieldNum=FCOUNT()
lcString= 'Select '
FOR lnCount=1 TO lnFieldNum
lcString=lcString+FIELD(lnCount)+ ' As '+ALLTRIM(EVALUATE(FIELD(lnCount)))+ ', '
ENDFOR
lcString=LEFT(lcString,LEN(lcString)-1)+ ' INTO TABLE aaa FROM TEST '
&lcString
这是我在网上下的程序程序,
COPY TO TEST.DBF FOR RECNO()> 1 中的test.dbf我已做好了,
lcString=LEFT(lcString,LEN(lcString)-1)+ ' INTO TABLE aaa FROM TEST
运行的时候有一个致命错误c000005
请大虾帮忙搞一下
------解决方案--------------------------------------------------------
local oExcel
oExcel=createobject( "excel.app ")
oExcel.workbooks.open(strPath)
arrTableInfo=oExcelApp.activesheet.usedrange.value
oExcel.quit
insert into dirtable from arrTableInfo