中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-03 13:02
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » How to directly convert a TXT file to an XLS file using batch processing
Printable Version  4,918 / 16
Floor16 xycoordinate Posted 2007-02-24 12:13
中级用户 Posts 228 Credits 493 From 安徽
Originally posted by amao at 2007-2-23 02:20 PM:
sed "s/^*//;s/\+/\t/g" report.txt> result.xls

For downloading and using sed, please search the forum with "sed"

[ Last edited by amao on 2007-2007-2-24 at 03:22 AM ]


Amazing!!!
Floor17 zh159 Posted 2007-02-24 14:37
金牌会员 Posts 1,467 Credits 3,687
cd.>test.xls
Create an empty test.xls file

set "str=!str: = !"
(Replace two spaces with one space)

set "str=!str: ={TAB} !"
(Replace one space with a tab + one space, because the forum cannot display tabs correctly, so use {TAB} to indicate, actually press the tab key at the {TAB} position)
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023