Sub test()
Dim p$, f$, A, i, j, s$
p = ThisWorkbook.Path & "\"
f = Format(Now, "yyyymmdd-hhmmss") & ".txt"
A = Sheets(1).UsedRange
Open p & f For Output As #1
For i = 2 To UBound(A)
s = ""
For j = 1 To UBound(A, 2)
s = s & "," & """" & A(i, j) & """"
Next j
s = Mid(s, 2)
Print #1, s
Next i
Close #1
Shell "explorer " & p & f, vbNormalFocus
End Sub
1.rar
(10.98 KB, 下载次数: 4)