嗨,我在我的文本文件中有这些行:
Registrant State/Province:
Registrant Postal Code:
Reistrant Country:
Registrant Phone:
Admin Name:
Admin Organization:
Admin Street:
Admin City:
如何使用excel vba在每行之前添加5到10个空格的空格。
感谢您的帮助。
答案 0 :(得分:0)
重命名后,用空格创建文件的副本......
Dim s, s1 As String
Dim xx As String
s = "e:\0\a\Space.txt"
s1 = "e:\0\a\Space.dat"
Open s For Input As #1
Open s1 For Output As #2
While Not EOF(1)
Line Input #1, xx
Print #2, Space(10) & xx
Wend
Close #1
Close #2
Kill s
Name s1 As s
更改一些代码,您可以在行内添加空格或其他数据。