VB操作excel写回txt

Private Sub addition(str As String)
Dim strInfo As String
Dim strdd As String
strInfo = "扫描失败"
strdd = "成功"
Open "d:\error.txt" For Output As #1
Write #1, str
Close #1
End Sub



Public Sub GetGuJiaFromExcel()
Dim str2 As String
Sheets("统计图谱相关参数").Cells(25, 2) = ""
For j = 90 To 269
For i = 1 To 180
str2 = str2 & "," & Sheets("统计图谱相关参数").Cells(j, i).Text
Next
Next
addition (str2)

End Sub

猜你喜欢

转载自blog.csdn.net/sunboylife/article/details/111039653