'用VBS写的,做个参考吧!dim m(3,3) '要根据内容所定set fso=createobject("scripting.filesystemobject") set file=fso.opentextfile("1.txt") while file.atendofstreamtrue
h=h+1
n=file.readline:s=split(n):l=ubound(s)
for i=0 to l
m(h,i+1)=s(i)
next
wendfile.closem(2,2)="12":m(3,1)="10" '可以根据你想替换的内容进行修改for i=1 to 3
for j=1 to 3
if j=3 then
sm=sm & m(i,j) & vbcrlf
else
sm=sm & m(i,j) & " "
end if
nextnextset file=fso.opentextfile("1.txt",2) file.write smfile.closecreateobject("wscript.shell").run "notepad.exe 1.txt" |