|
Sub 按钮1_Click()
Application.ScreenUpdating = False
a = 2
For Each f In CreateObject("scripting.filesystemobject").getfolder(ThisWorkbook.Path & "\RawData").Files
Open f For Input As #1
While Not EOF(1)
Line Input #1, str1
If InStr(str1, ";Logged:") > 0 Then
Cells(a, 1).Resize(1, 2) = Split(Split(str1, "Logged:")(1), " at ")
Else
If Left(str1, 5) = ";Min:" Then
Cells(a, 3) = Split(Split(str1, ";Min:")(1), "mJ")(0)
Else
If Left(str1, 5) = ";Max:" Then
Cells(a, 4) = Split(Split(str1, ";Max:")(1), "mJ")(0)
Else
If InStr(str1, ";Average:") > 0 Then
Cells(a, 5) = Split(Split(str1, ";Average:")(1), "mJ")(0)
Else
If InStr(str1, ";Std.Dev.:") > 0 Then
Cells(a, 6) = Split(Split(str1, ";Std.Dev.:")(1), "mJ")(0)
Else
If InStr(str1, ";Overrange:") > 0 Then
Cells(a, 7) = Split(str1, ";Overrange:")(1)
Else
If InStr(str1, ";Total Pulses:") > 0 Then
Cells(a, 8) = Split(str1, ";Total Pulses:")(1)
a = a + 1
GoTo l1
End If
End If
End If
End If
End If
End If
End If
Wend
l1:
Close #1
Next f
Application.ScreenUpdating = True
End Sub
|
评分
-
1
查看全部评分
-
|