AT-E03 有無 Excel 輸出文字檔範例 ?
Sub Export()
On Error Resume Next
Dim DestFile As String
Dim FileNum As Integer
Dim ColumnCount As Integer
Dim RowCount As Integer
FileNum = FreeFile()
DestFile = “C:\current.txt”
Open DestFile For Output As #FileNum
Print #FileNum, Cells(1, 1) & “” & Time & “,” & Cells(1, 3) & “,” & Cells(1, 4);
Close #FileNum
End Sub