发布网友 发布时间:2022-04-24 22:47
共2个回答
热心网友 时间:2023-10-13 22:20
Open DPath + "a1.txt" For Output As #1
Print #1, replace(replace(Total,chr(13),""),chr(10),"")
Close #1
上面那个太麻烦了,如果存在多个还会出错,我这个不会 嘿嘿
jc:
if right(total,1)=chr(10) or right(total,1)=chr(13) then
total=mid(1,len(toral)-1)
goto jc
end if
只处理最后有回车或者换行的
热心网友 时间:2023-10-13 22:21
tempstr=total
for i=1 to len(tempstr)
if mid(tempstr,i,1)<>chr(10) or mid(tempstr,i,1)<>chr(10) then
total=total & mid(tempstr,i,1)
end if
next
Open DPath + "a1.txt" For Output As #1
Print #1, Total
Close #1