6

I've got a CSV file with delimiter character being |, but can't really find a way to convert it to XLS that would apply the delimiter.

ssconvert -O 'separator=|' test.csv test.xls

will obviously yield with message like:

The file saver does not take options

The outcome is an XLS file with entire rows treated as one column (concatenated, like in text format) instead of spread according to given delimiter. Expected outcome is obviously properly delimited file.

It's been bothering me for a while, could anybody give me a hint?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Patrick
  • 165
  • 1
  • 4
  • 13

2 Answers2

4

Unfortunately, option parameters can only be specified for the exporter, not the importer.

But you can replace the delimiter characters | with TABs, so that ssconvert recognizes columns.

tr '|' '\t' <test.csv | ssconvert fd://0 test.xls
Armali
  • 18,255
  • 14
  • 57
  • 171
3

Does

ssconvert -O 'separator=|' test.TXT test.xls

work for you? So: .TXT, not .CSV

superkoning
  • 914
  • 2
  • 8
  • 12
  • I'm converting csv to xls it works great. but the xls is break into multiple lines because some coloumn have mutliple line breaks in csv . so please help how to handle it. – truesource Jun 02 '17 at 09:12