
Product
Introducing Repository Labels and Security Policies
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
datatables-export-document
Advanced tools
Export your grid data to many document. Support doc, xls, pdf, csv, xml, html, and print out.
Export your grid data to many document. Support doc, xls, pdf, csv, xml, html, and print
var dt = $('#example-table').DataTable();
// Export to Word Document
// On element with id="btn-export" clicked
$('body').on('click', '#btn-export', function(e) {
$.fn.DataTable.Export.word(dt, {
filename: 'customer-lists',
title: 'Report',
message: 'Customer lists',
header: [
'ID',
'Name',
'Position',
'Join Date',
'Salary'
],
field: [
0,
1,
4,
5,
8
]
});
});
To Word (.doc) $.fn.DataTable.Export.word(dataTable, config)
To Excel (.xml) $.fn.DataTable.Export.excel(dataTable, config)
To CSV (.csv) $.fn.DataTable.Export.csv(dataTable, config)
To PDF (.pdf) $.fn.DataTable.Export.pdf(dataTable, config)
To XML (.xml) $.fn.DataTable.Export.xml(dataTable, config)
To HTML $.fn.DataTable.Export.html(dataTable, config)
To Print $.fn.DataTable.Export.print(dataTable, config)
*) for pdf you must integrate pdfmake plugin (pdfmake.js and vfs_fonts.js)
{
filename: '...',
// document title
title: '...',
// document description
message: '...',
// header title
header: [
'ID',
'Name',
'...'
],
// field
field: [
0,
1,
4,
5,
'...'
],
// or
field: [
'employe_id',
'name',
'....'
],
// orientation (pdf and word only)
'orientation' => 'landscape',
// separator (csv only)
'separator' => ','
// for pdf only
'download' => 'download' // or 'open' for preview
'pageSize' => 'A4',
}
FAQs
Export your grid data to many document. Support doc, xls, pdf, csv, xml, html, and print out.
The npm package datatables-export-document receives a total of 3 weekly downloads. As such, datatables-export-document popularity was classified as not popular.
We found that datatables-export-document demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.
Product
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.