您的位置:程序门 -> 其他开发语言 -> 其他开发语言



txt转excel


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


txt转excel
发表于:2008-01-13 18:04:46 楼主
begin:vcard
version:2.1
fn:曾迎冲
n:曾迎冲
x-master-pos:00009
categories:朋友
tel;cell:13410291517
x-pos-tel-mobile:00105\;mlslot:00145\;00008\;00255\;
uid:00105
end:vcard
begin:vcard
version:2.1
fn:陈景华
n:陈景华
x-master-pos:00011
categories:同事
tel;cell:13415913829
x-pos-tel-mobile:00131\;mlslot:00177\;00005\;00255\;
uid:00131
end:vcard
begin:vcard
version:2.1
fn:陈莎
n:陈莎
x-master-pos:00014
categories:朋友
tel;cell:13977600422
x-pos-tel-mobile:00170\;mlslot:00225\;00008\;00255\;
uid:00170
end:vcard
begin:vcard
version:2.1
fn:陈武
n:陈武
x-master-pos:00015
categories:家人
tel;cell:13725729013
x-pos-tel-mobile:00183\;mlslot:00241\;00007\;00255\;
uid:00183
end:vcard
/////////////////////////////////////////////////////////
//txt文本里显示的是这个样子的,把它导入到excel的表里怎么做啊?     谢谢了
发表于:2008-01-13 22:53:491楼 得分:0
assembly code
vcard version:2.1 fn n x-master-pos categories tel;cell x-pos-tel-mobile mlslot uid 曾迎冲 曾迎冲 00009 朋友 13410291517 00105\; 00145\;00008\;00255\; 00105 陈景华 陈景华 00011 同事 13415913829 00131\; 00177\;00005\;00255\; 00131 陈莎 陈莎 00014 朋友 13977600422 00170\; 00225\;00008\;00255\; 00170 陈武 陈武 00015 家人 13725729013 00183\; 00241\;00007\;00255\; 00183

将以上内容做成一个文本文件,但是扩展名直接改成*.xls就好了。
以上内容是用ultraedit通过查找/替换功能制作。
发表于:2008-01-13 22:57:152楼 得分:0
上面内容有4个空格的地方是制表符(^t、\0x09),论坛把它改了,你可以用查找/替换功能再该回来。
发表于:2008-01-13 23:13:183楼 得分:0
楼上的能说详细点吗,不是很明白呢
发表于:2008-01-14 06:33:564楼 得分:0
excel本身是可以识别txt格式的文件的,只要将扩展名改为xls就可以了,其中表示单元格的标识就是“制表符”,即键盘上的那个“tab”键。
至于查找/替换的策略,你了解正则表达式的话就很容易,如果不了解那就先去学学。


快速检索

热门点击