excel如何转化为多个文本文件

来源:百度知道 编辑:UC知道 时间:2024/09/25 11:21:38
我在excel中排好列了,怎么才可以每列让它自然生成一个文本文件?
谢谢大家

这个问题我以前回答过,excel不能把具体的每一列转为txt

用VBA可做,如A列生成“A.txt”:
Private Sub CommandButton1_Click()
Dim rag As Range
Open "A.txt" For Output As #1
For Each rag In Range("A:A")
If rag.Value <> "" Then
Print #1, rag.Value
End If
Next
Close #1
End Sub