导入excel文件出错
SET DEFAULT TO C:\DATA\TESTSET TALK OFF
SET SAFETY OFF
CLOSE DATABASES
CREATE CURSOR TEM (时间 C(5),姓名 C(10),性别 l,编号 C(6))
ADIR(ABC)
FOR I=1 TO ALEN(ABC)/5
? ABC(I,1)
OEXCEL = CREATEOBJECT("EXCEL.APPLICATION")
WITH OEXCEL
***********
.WORKBOOKS.OPEN(ABC(I,1)) &&出错的语句
***********
* .WORKBOOKS.OPEN(SYS(5) + SYS(2003) +ABC(I,1))
.DISPLAYALERTS = .F.
.ACTIVEWORKBOOK.SAVEAS(SYS(5) + SYS(2003) + "\0326.TXT", -4158) && 保存为以制表符分隔的文本文件
.ACTIVEWORKBOOK.CLOSE
.DISPLAYALERTS = .T.
.QUIT
ENDWITH
RELEASE OEXCEL
SELECT TEM
APPEND FROM 0326.TXT DELIMITED WITH TAB
ERASE 0326.TXT
ENDFOR