How to check size file CSV export by jQuery Datatables?
How to check size file CSV export by jQuery Datatables?

I'm doing the CSV export function with Datatables, but now I want to check if the file size is greater than 1MB, I won't export the file.
But I don't know how to do it, hope someone will know or have done a check on CSV file size.
Thanks in advance!
This discussion has been closed.
Answers
Hi @hoangemini ,
You won't be able to check the file size without creating it, but you could check the number of rows as a guide and use that instead (
rows()
). Then, insideinitComplete
you could either disable the button (button().disable()
) or just remove it (button().remove()
).Cheers,
Colin