Excel button
Excel button
eddie909
Posts: 31Questions: 6Answers: 0
Is there a way to automatically execute the excel button once the page is loaded instead of a user selecting the excel button?
thanks,
_ Ed
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You could try calling the
buttons().trigger()
method for that button.I think some browsers might not allow the file to be created and downloaded without user interaction triggering that action though (otherwise any web-site could do a drive by download without the user requesting the download, which would be a major security flaw).
Allan
Allan,
Thanks for getting back to me. I just spoke with my user and they like the following:
buttons: excel, csv and pdf.
I do have a question about sorting. Can I sort of the 3rd row (Product ID Title Amount)?
Company Name Address
test name 101 South Ocean Ave
Product ID Title Amount
1234 test title 49.99
5678 test abc 19.99
4521 test zxc 29.99
The
order
option is how to tell DataTables which column to sort on by default.Allan
Allan,
thanks again.