2

I am using Excel 2010 (v14.0) on Windows 7.

I would like to have a header, and subheader, where columns are merged in the header but separated in the subheader and data. I know how to merge columns in Excel but is there some way to format the CSV (or some sort of ASCII) input so that Excel interprets the columns, in the ASCII input, as merged?

3
  • 3
    Have you tried creating a spreadsheet with a header, subheader and data? Export as csv and see what it looks like. Import it again and see what happens. Hint: it is not possible. Csv export stores only your raw data cell by cell in a plain text file. It does not know anything about formatting or merged cells. Your merged cells are empty cells.
    – DavidPostill
    Jul 14, 2015 at 14:16
  • 1
    To add to David's comments, the xlsx file is basically a compressed file. Open excel with winzip or winrar... You will see there is a lot of files there. This is how excel stores this information ... A csv filr is just a csv file
    – Dave
    Jul 14, 2015 at 14:21
  • One method would be to include a specific string in the CSV indicating that cells should be merged and write an Excel macro that searches for this string and merges them. See this answer for an example of a VBA macro that does something similar. Oct 9, 2019 at 16:31

1 Answer 1

3

Is there a way to format a CSV file so that Excel interprets the columns as merged?

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.


Further reading Comma-separated values

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .