12

How to merge two cell in CSV file like as Excel?

I want to merge two cell in CSV file file as:

Header         Id        Name                       mobileNo
Sub-Header     id   first Name last Name     countryCode  MobNumber  
Yves M.
  • 29,855
  • 23
  • 108
  • 144
  • 2
    I don't understand why this question was down-voted. If you're going to down-vote at least put down a comment. Yes, it is a simple question but I don't see anything fundamentally wrong with it. – MarioS May 23 '18 at 13:25
  • 2
    Check https://superuser.com/questions/940464/csv-input-for-merged-columns-in-microsoft-excel – nathan Feb 09 '19 at 13:28

2 Answers2

13

This is not possible

  • A comma-separated values (CSV) file stores tabular data (numbers and text) in plain text.
  • It is just data, with no attached formatting or knowledge of how the cells should be merged when the data is imported.

You could use a script maybe like python to merge them, refer this link https://dzone.com/articles/merging-cells

Surya Tej
  • 1,342
  • 2
  • 15
  • 25
-1

You can just keep on adding comma's after a text in one cell to merge it with other cells. It did work for me at least.

  • 1
    Please show example of what you mean. This doesn't sound like what the OP was looking for. I'm looking for a way to actually merge the cells, not just skip a few cells. – Joe Nov 10 '21 at 14:49
  • Show how it is done. Correctly type out a code implementation, please? – How why Mar 11 '23 at 07:51