cDefPath = ADDBS(JUSTPATH(SYS(16))) SET DEFAULT TO (cDefPath) **COPY FILE "汇总分析 - 副本.doc" TO 汇总分析.doc docFile = cDefPath + "汇总分析.doc" word = CREATEOBJECT("Word.Application") doc = word.Documents.Open(docFile) FOR EACH table IN doc.tables FOR row=table.rows.count TO 3 STEP -1 bDel = .T. FOR col=3 TO table.columns.count bDel = EMPTY(RTRIM(table.cell(row,col).range.text,0h20,0h0D,0h07)) IF !bDel EXIT ENDIF ENDFOR IF bDel table.cell(row,3).delete(2) ENDIF ENDFOR ENDFOR doc.Close word.Quit