Change exported page orientation and customise number of entries shown
Change exported page orientation and customise number of entries shown
linksdesign
Posts: 11Questions: 5Answers: 0
Could anyone offer some advice on adding two options to my current code?
- I would like to change the exported files to landscape orientation for Excel and PDF.
- I would like to add a custom box to Show Entries selector to allow users to enter their own number.
Current code:
$(document).ready( function () {
$('#Statements').DataTable({
dom: 'Bfrltip',
buttons: [
'print','excel','csv','pdf'
],
lengthMenu: [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ]
});
} );
Any help would be appreciated!
This discussion has been closed.
Answers
Hi @linksdesign ,
For orientation in Excel, see this thread.
For orientation in PDFs - see example here.
For restricting number of rows, see example here.
Cheers,
Colin