China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-11-10 21:35
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to directly convert a TXT file to an XLS file using batch processing View 5,613 Replies 16
Floor 16 Posted 2007-02-24 12:13 ·  中国 安徽 马鞍山 电信
中级用户
★★
Credits 493
Posts 228
Joined 2007-02-16 00:38
19-year member
UID 79596
Gender Male
From 安徽
Status Offline
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!!!
Floor 17 Posted 2007-02-24 14:37 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
21-year member
UID 44210
Status Offline
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)
Forum Jump: