TA的每日心情 | 衰 2016-10-19 21:23 |
---|
签到天数: 2 天 [LV.1]初来乍到
|
发表于 2018-5-22 17:40:46
|
显示全部楼层
'WELLNAME DATE EVENT LAYER TOP BOTTOM WELLDIA SKIN kh TABLE_NO BHP
'1 2\3\4 5 6\7 8 9 10 11 12 13 14
Private Sub CommandButton1_Click()
Dim i, j, k As Integer
Open "C:\Perforation.EV" For Output As #1
k = 2
Print #1, "WELLNAME", ActiveSheet.Cells(k, 1)
Do While ActiveSheet.Cells(k, 1) <> ""
If ActiveSheet.Cells(k, 1) <> ActiveSheet.Cells(k + 1, 1) Then
Print #1, ActiveSheet.Cells(k, 2) & "." & ActiveSheet.Cells(k, 3) & "." & ActiveSheet.Cells(k, 4), ActiveSheet.Cells(k, 5), "(" & ActiveSheet.Cells(k, 6) & "-" & ActiveSheet.Cells(k, 7) & ")", "2*", ActiveSheet.Cells(k, 10), ActiveSheet.Cells(k, 11), ActiveSheet.Cells(k, 12), ActiveSheet.Cells(k, 13), ActiveSheet.Cells(k, 14)
Print #1, "WELLNAME", ActiveSheet.Cells(k + 1, 1)
Else
Print #1, ActiveSheet.Cells(k, 2) & "." & ActiveSheet.Cells(k, 3) & "." & ActiveSheet.Cells(k, 4), ActiveSheet.Cells(k, 5), "(" & ActiveSheet.Cells(k, 6) & "-" & ActiveSheet.Cells(k, 7) & ")", "2*", ActiveSheet.Cells(k, 10), ActiveSheet.Cells(k, 11), ActiveSheet.Cells(k, 12), ActiveSheet.Cells(k, 13), ActiveSheet.Cells(k, 14)
End If
k = k + 1
Loop
MsgBox "已经生成*.EV for SCH 文件!"
Close #1
End Sub
|
|