Sub DM()
Dim i, j, m, n As Integer
For i = 1 To 1236
'左断面数据cass格式转苏交科断面格式
If Cells(i, 1) = "BEGIN" Then j = i
If Cells(i + 1, 1) = "0" Then m = i - j
For n = 1 To m - 1
If Cells(i + 1, 1) = "0" Then Cells(i, 2 * n + 1) = Abs(Cells(i - n, 1)): Cells(i, 2 * n + 2) = Abs(Cells(i - n, 2))
Next
Next
'右断面数据cass格式转苏交科断面格式
For i = 1 To 1236
If Cells(i, 1) = "0" Then j = i
If Cells(i + 1, 1) = "BEGIN" Then m = i - j
For n = 1 To m
If Cells(i + 1, 1) = "BEGIN" Then Cells(j, 2 * n + 1) = Cells(j + n, 1): Cells(j, 2 * n + 2) = Cells(j + n, 2)
Next
Next
'里程
For k = 1 To 1236
If Cells(k, 1).Value = "BEGIN" Then Cells(k, 1) = Cells(k, 2): Cells(k, 2) = " "
Next
End Sub
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载