|
发表于 2014-3-17 12:36
|
显示全部楼层
本楼为最佳答案
- Sub test()
- Dim strFile$
- Dim strPath$
- Dim strTemp$
- strPath = ThisWorkbook.Path & Application.PathSeparator
- strFile = "test.txt"
- Open strPath & strFile For Input As #1
- strTemp = StrConv(InputB(LOF(1), #1), vbUnicode)
- Close #1
- Open strPath & strFile & "-new.txt" For Output As #1
- strTemp = Replace(strTemp, vbCrLf, " ")
- Print #1, strTemp
- Close #1
- End Sub
复制代码 写入的,不过是写入到了新文件。 |
|