Question

Merge two column names


Badge

Hello All,

I have an excel file wherein i have two header rows, first one with a main heading like 2019 and the second one below it having sub-categories like Furniture, Music, Fun and then the data from third row. Is there a way to write the data to an excel file in the same manner of first row showing the merged cell and the second row showing all showing all separate values?

Thanks


3 replies

Userlevel 2
Badge +17

Hi @asabhinavgreats, as far as I know, using a template is the only way to achieve that. See this article to learn more: Using a Template File when Writing Excel Data

Badge

Hi @asabhinavgreats, as far as I know, using a template is the only way to achieve that. See this article to learn more: Using a Template File when Writing Excel Data

Tried something but it isn't working @takashi. Can you please explain me the concept of doing it?

Badge +10

Hi @asabhinavgreats,

The idea behind using a template Excel file is so that you could have headers set up or styling set up in a particular, static, way. This allows you to then write your data to where you want it to go in the Excel file.

You'll want to look at the writer feature type parameters as well and set the Start Cell Location value to a particular cell (where you would want the data to be written) as well as if you do or do not want field names to be written as well.

Along with the article Takashi suggested for using a template file, I would also recommend viewing this article about an Overview of Excel Writer Parameters and the Excel Writer feature type paramter documentation.

Hope this information is helpful for you! If you are still having some trouble setting this up, to better assist you please share your workspace saved as a template file (this will include your source dataset as well).

- Andrea

Reply