发布网友 发布时间:2022-04-24 07:33
共1个回答
热心网友 时间:2022-06-17 15:55
假如你要把A列的A1~A100批量导出txt,插入以下宏并执行:
Sub bod()
Dim nm$
For I = 1 To 100
n = n + 1
nm = ThisWorkbook.Path & "\" & Application.Trim(Cells(I, 1)) & ".txt"
Open nm For Output As #I
Print #I, Cells(I, 1) 'Cells(i, 1)为每个txt里面要放的内容,可替换,内容为空则删除
Close #I
Next
End Sub