程序代码:
CLOSE DATABASES lcPath = "C:\Users\Administrator\Desktop\表文件名\表文件名" SET DEFAULT TO (lcPath) oExcel = NEWOBJECT("Excel.Application") USE filenam BLANK FIELDS rs ALL SCAN WITH oExcel .WorkBooks.Open(lcPath + "\" + Fname) FOR lnj = 3 TO .ActiveSheet.UsedRange.Rows.Count IF ISNULL(.ActiveSheet.Cells(lnj, 2).value) EXIT ENDIF ENDFOR .ActiveWorkbook.Close(.F.) ENDWITH REPLACE rs WITH lnj - 3 ENDSCAN oExcel.Quit BROWSE