Please support cells containing commas.
When a cell contains a comma, it cannot be parsed correctly. It will parse to multiple columns.
Can you provide more detail about the error. Is it a plain text file (*.txt, *.csv) or an Excle file? Is the cell contains the comma is quoted with "?
Excel sheet:
────────────┬──────────┬──────────┬───────┬─────────────────────┬────────────────┬──────────┬────────────┐
│ 省、直辖市 │ 所辖城市 │ 长途区号 │ NDCH0 │ H1H2H3 │ 是否可携号转网 │ 号段类型 │ 局数据文号 │
├────────────┼──────────┼──────────┼───────┼─────────────────────┼────────────────┼──────────┼────────────┤
│ 北京 │ 北京 │ 10 │ 1932 │ 000-022 │ 是 │ 用户号段 │ JSJ-20206 │
│ 安徽 │ 阜阳 │ 558 │ 1931 │ 415-417,519,611-613 │ 是 │ 用户号段 │ JSJ-20206 │
│ 安徽 │ 宿州 │ 557 │ 1931 │ 414,500-518,610 │ 是 │ 用户号段 │ JSJ-20206 │
│ 北京 │ 北京 │ 10 │ 1931 │ 111,420,990-999 │ 是 │ 用户号段 │ JSJ-20206 │
│ 广东 │ 广州 │ 20 │ 1930 │ 200-209,300-306 │ 是 │ 用户号段 │ JSJ-20206 │
│ 广东 │ 惠州 │ 752 │ 1930 │ 752 │ 是 │ 用户号段 │ JSJ-20206 │
│ 广东 │ 汕头 │ 754 │ 1930 │ 688,754 │ 是 │ 用户号段 │ JSJ-20206 │
│ 广东 │ 珠海 │ 756 │ 1930 │ 756 │ 是 │ 用户号段 │ JSJ-20206 │
│ 广东 │ 肇庆 │ 758 │ 1930 │ 758 │ 是 │ 用户号段 │ JSJ-20206 │
└────────────┴──────────┴──────────┴───────┴─────────────────────┴────────────────┴──────────┴────────────┘
rsv cmd:
$ rsv head -s \t 193.xlsx
省、直辖市,所辖城市,长途区号,NDCH0,H1H2H3,是否可携号转网,号段类型,局数据文号
北京,北京,10,1932,000-022,是,用户号段,JSJ-20206
安徽,阜阳,558,1931,415-417,519,611-613,是,用户号段,JSJ-20206
安徽,宿州,557,1931,414,500-518,610,是,用户号段,JSJ-20206
北京,北京,10,1931,111,420,990-999,是,用户号段,JSJ-20206
广东,广州,20,1930,200-209,300-306,是,用户号段,JSJ-20206
广东,惠州,752,1930,752,是,用户号段,JSJ-20206
广东,汕头,754,1930,688,754,是,用户号段,JSJ-20206
广东,珠海,756,1930,756,是,用户号段,JSJ-20206
广东,肇庆,758,1930,758,是,用户号段,JSJ-20206
other tool:
R:\Downloads>heimdall convert -i 193.xlsx -f csv | head -10
省、直辖市,所辖城市,长途区号,NDCH0,H1H2H3,是否可携号转网,号段类型,局数据文号
北京,北京,10,1932,000-022,是,用户号段,JSJ-20206
安徽,阜阳,558,1931,"415-417,519,611-613",是,用户号段,JSJ-20206
安徽,宿州,557,1931,"414,500-518,610",是,用户号段,JSJ-20206
北京,北京,10,1931,"111,420,990-999",是,用户号段,JSJ-20206
广东,广州,20,1930,"200-209,300-306",是,用户号段,JSJ-20206
广东,惠州,752,1930,752,是,用户号段,JSJ-20206
广东,汕头,754,1930,"688,754",是,用户号段,JSJ-20206
广东,珠海,756,1930,756,是,用户号段,JSJ-20206
广东,肇庆,758,1930,758,是,用户号段,JSJ-20206
R:\Downloads>gxlsx2csv -f 193.xlsx | head -10 | iconv -f UTF-8
"省、直辖市";"所辖城市";"长途区号";"NDCH0";"H1H2H3";"是否可携号转网";"号段类型";"局数据文号"
"北京";"北京";"10";"1932";"000-022";"是";"用户号段";"JSJ-20206"
"安徽";"阜阳";"558";"1931";"415-417,519,611-613";"是";"用户号段";"JSJ-20206"
"安徽";"宿州";"557";"1931";"414,500-518,610";"是";"用户号段";"JSJ-20206"
"北京";"北京";"10";"1931";"111,420,990-999";"是";"用户号段";"JSJ-20206"
"广东";"广州";"20";"1930";"200-209,300-306";"是";"用户号段";"JSJ-20206"
"广东";"惠州";"752";"1930";"752";"是";"用户号段";"JSJ-20206"
"广东";"汕头";"754";"1930";"688,754";"是";"用户号段";"JSJ-20206"
"广东";"珠海";"756";"1930";"756";"是";"用户号段";"JSJ-20206"
"广东";"肇庆";"758";"1930";"758";"是";"用户号段";"JSJ-20206"
The number of output columns is inconsistent.
$ rsv select -c 1,2,3,4 193.xlsx | head -5
所辖城市,长途区号,NDCH0,H1H2H3
北京,10,1932,000-022
阜阳,558,1931,415-417,519,611-613
宿州,557,1931,414,500-518,610
北京,10,1931,111,420,990-999
Thank you for the detailed reply. I can notice that the problem is caused because the utility does not handle within-column comma separator properly. It conflicts with the file comma separator.
To fix the problem, quoted column must be introduced, like the output in your heimdall command.
Right now, I'm not available to fix the bug. It maybe fixed several days later.