Excel Export callback

Excel Export callback

belubelu Posts: 38Questions: 14Answers: 0

Hi there,
does something like an export to excel callback exist?
I have a column 'marked_as_exported' and want every exported row to be marked as exported automatically. So ist there a 'callback', where I set the 'marked_as_exported' - value to 1 after a successful export?

Thanks in advance!

Answers

  • allanallan Posts: 61,726Questions: 1Answers: 10,110 Site admin

    Yes, you can use a row-selector as part of the exportOptions object for the excelHtml5 button type.

    The row selector can be given as a function and is executed once for each row, you return a boolean to indicate if you want the row to be included or not.

    Allan

  • belubelu Posts: 38Questions: 14Answers: 0

    Does the row-selector show only rows that are selected by clicking on them, or every row that is shown by the actual filter?
    I would like to export e.g. every entry that was made in february - so I would filter for february (several thousand entries) and export them and make them marked as exported. If I would have to select (mark) them separately, this is no option, because too much work...

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    Hi @belu ,

    Your function will be passed all rows. As Allan said, you can then decide whether to include or exclude them,

    Cheers,

    Colin

This discussion has been closed.