程序代码:
oExcel = CreateObject("Excel.Application") oExcel.WorkBooks.OpenText(SYS(5)+SYS(2003)+"\gzb.txt",936,1,1,1,,,,.T.) oExcel.Columns(2).NumberFormatLocal = "000" **oExcel.Visible = .T. oExcel.DisplayAlerts = .F. oExcel.ActiveWorkbook.Saveas(SYS(5) + SYS(2003) + "\gzb.xlsx",51) oExcel.ActiveWorkbook.Close() oExcel.DisplayAlerts = .T. oExcel.QUIT RELEASE oExcel
OPENTEXT()方法的用法见下面网址
https://learn.