Can rows and columns be combined in export options and for selected rows only?

Can rows and columns be combined in export options and for selected rows only?

mhjamhja Posts: 12Questions: 5Answers: 0

Managed to get only visible rows exported using the following

    "buttons": [
        {
            extend: 'copyHtml5',
            exportOptions: {
                rows: [ 0, ':visible' ]
            }
        },
        {
            extend: 'excelHtml5',
            exportOptions: {
                rows: [ 0, ':visible' ]
            }
        }   
    ]

Questions:
1) Can rows and columns be combined so that only defined columns of visible rows are exported?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    With columns, that can be made invisible with column().visible() - there isn't an API call to make rows (in)visible, so that wouldn't be the case here.

    If you've used some other method to hide them, you can pass a function into that row-selector (where ':visible' currently is) that uses logic to check for the row's visibility,

    Colin

Sign In or Register to comment.