react-data-export icon indicating copy to clipboard operation
react-data-export copied to clipboard

Support for header groups

Open JTFlavier-Cob opened this issue 7 years ago • 1 comments

Hello there! Thank you for creating this library. It has been very helpful.

Does this library currently support header groups? I am using react-table to render tables with header groups that look like this (this table goes on until December):

image

The JSON input for react-table looks something like this:

[
    {
        name: "Alpha",
        age: 23,
        sex: "F",
        salary: 3213, 
        months: [
            {
                month: "Jan",
                income: 12312,
                expense: 23,
                profit: 12289
            }, 
            {
                month: "Feb",
                income: 345624,
                expense: 23,
                profit: 345601
            },
            ...
        ]
    },
    ...
]

By setting up react-table's columns parameter in a nested manner, I am able to make the table seen above.

Given the data structure above, is it possible for me to export an excel file that looks like the example?

JTFlavier-Cob avatar Apr 01 '19 07:04 JTFlavier-Cob

unfortunately, it is not supported with header columns, only way was the one you already tried :)

securedeveloper avatar Apr 01 '19 09:04 securedeveloper