llRow = 0
Set xlBook = xlApp.Workbooks.Add()
Set xlsheet = xlBook.Worksheets(1)
Open lsFileName For Input As #1
Do While Not EOF(1)
Line Input #1, lsTemp
n = Split(lsTemp, " ")
Debug.Print lsTemp
llRow = llRow + 1
ColNum = 0
For llCol = 0 To UBound(n)
If Len(Trim(n(llCol))) Then
ColNum = ColNum + 1
xlsheet.Cells(llRow, ColNum) = n(llCol)
End If
Next
Loop
Close #1
xlBook.SaveAs lsFileName & ".xls"
xlBook.Close (True)
xlApp.Quit
Set xlApp = Nothing像对上述程序进行些修改
在生成的新xls文件显示在OLE的excel表格中
请问该再添加写什么程序
请前辈指出
Set xlBook = xlApp.Workbooks.Add()
Set xlsheet = xlBook.Worksheets(1)
Open lsFileName For Input As #1
Do While Not EOF(1)
Line Input #1, lsTemp
n = Split(lsTemp, " ")
Debug.Print lsTemp
llRow = llRow + 1
ColNum = 0
For llCol = 0 To UBound(n)
If Len(Trim(n(llCol))) Then
ColNum = ColNum + 1
xlsheet.Cells(llRow, ColNum) = n(llCol)
End If
Next
Loop
Close #1
xlBook.SaveAs lsFileName & ".xls"
xlBook.Close (True)
xlApp.Quit
Set xlApp = Nothing像对上述程序进行些修改
在生成的新xls文件显示在OLE的excel表格中
请问该再添加写什么程序
请前辈指出
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货