xls文件内容存到txt文件内,如何跳过xls文件的列名或跳过第一行
xls文件内容存到txt文件内,如何跳过xls文件的列名或跳过第一行
cDefPath = ADDBS(JUSTPATH(SYS(16))) SET DEFAULT TO (cDefPath) CREATE DBF hbwj (xm C(30),yxzjhm C(20)) adir(wjm, "*.xls") OEXCEL = CREATEOBJECT("EXCEL.APPLICATION") OEXCEL.DISPLAYALERTS = .F. for i = 1 to alen(wjm,1) OEXCEL.WORKBOOKS.OPEN(cDefPath + wjm(i,1)) OEXCEL.ACTIVEWORKBOOK.SAVEAS(cDefPath+"sj.TXT", -4158) OEXCEL.ACTIVEWORKBOOK.CLOSE SELECT hbwj APPEND FROM sj.TXT FOR xm!="姓名" DELIMITED WITH TAB ENDFOR OEXCEL.QUIT SELECT * FROM hbwj
[此贴子已经被作者于2022-9-7 13:34编辑过]