xlsx 表数据内容导入到dbf表中出现的问题
帮助0611.rar
(8.82 KB)
LOCAL oExcel as Object ,oSht as object ,irow as Integer DIMENSION arr1[1,1] OEXCEL = CREATEOBJECT("EXCEL.APPLICATION") OEXCEL.DISPLAYALERTS = .F. wjm = "c:\XIDE\Prg\通知书.xlsx" OEXCEL.WORKBOOKS.OPEN(wjm) osht = OEXCEL.ActiveSheet irow = osht.usedrange.rows.count && 取最末行 arr1 = osht.range(osht.cells(2,1),osht.cells(irow,2)).value && 取数据区(从第2行开始)到数组arr1 OEXCEL.ACTIVEWORKBOOK.CLOSE() OEXCEL.QUIT() SELECT 通知书 APPEND FROM ARRAY arr1 DIMENSION arr1[1,1] && 释放.便于下一个循环再用.