告诉我如何解决这个问题?对不起我的英语不好。我来自乌克兰。 有一个CSV格式的文本文件,其中包含unix格式的字符串结尾。
List of fields:
1) ID;
2) Surname;
3) First name;
4) Middle name;
5) Date of birth;
6) Type and number of the document proving the identity;
7) Address of residence;
8) Registration address.
There are no tabs inside the field, but there is an unshielded newline character `("\ n")`.
第一个字段(ID)具有数字类型,并且保证不包含换行符。 如何在vba上编写将删除每个换行符的脚本 在田野里?
答案 0 :(得分:1)
试试这个宏;
Sub Broken_line_remover()
' Removing carriage returns from text strings
Dim ws As Worksheet
Set ws = ActiveSheet
ws.Cells.Replace what:=Chr(10), replacement:=" "
Set ws = Nothing
End Sub