Export Excel multiple Header with colspan

Export Excel multiple Header with colspan

jjnadouxjjnadoux Posts: 8Questions: 1Answers: 0

Hello,
I have a problem, I have a table with several headers with colspan and when exporting to excel I only have the last line of the hearder.
I tried several tutorials but it doesn't work!
Could someone help me please

Answers

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,736

    I tried several tutorials but it doesn't work!

    What tutorials did you try? Can you build a test case showing what you have and what you tried so we can help debug?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • jjnadouxjjnadoux Posts: 8Questions: 1Answers: 0

    I followed the directions here
    https://datatables.net/forums/discussion/comment/106434/#Comment_106434
    I can't show my code because it's for work.
    I know that I have to modify the Datatable.buttons.js and buttons.html5.js files but I end up with either an error or always a single line in the header

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,736

    I can't show my code because it's for work.

    We don't actually need to see your exact code. The goal with the test case is to build a running example with a sample of your table and data. You can use fake data because we aren't concerned about the actual data.

    I know that I have to modify the Datatable.buttons.js and buttons.html5.js files but I end up with either an error or always a single line in the header

    Its hard to say what the problem might be without seeing it. I wouldn't recommend modifying the buttons code as it would be lost if you upgraded. I suggest that you use the customize function. I don't have an example but there might be other threads with an example.

    This example from this thread shows how to export child detail rows. Maybe it will give you some ideas of what you need to do. If you need help please use a test case to show the problem. In fact you can start with this example and modify it to do what you want. If you need help you can post the new link.

    Kevin

This discussion has been closed.