반응형


datatables.js 에서 다음과 같은 방법으로 로딩된 데이터를 csv 로 내보낼 수 있다.

(참조:https://datatables.net/extensions/buttons/examples/html5/simple.html)



<table id="example">


$(document).ready(function() {
    $('#example').DataTable( {
        dom: 'Bfrtip',
        buttons: [
            'copyHtml5',
            'excelHtml5',
            'csvHtml5',
            'pdfHtml5'
        ]
    } );
} );


반응형
반응형


datatables.js 사용하며 영문으로 표기된 부분의 언어를 바꾸는 방법은 아래와 같습니다.

[원본: https://datatables.net/reference/option/language ]

{
    "decimal":        "",
    "emptyTable":     "No data available in table",
    "info":           "Showing _START_ to _END_ of _TOTAL_ entries",
    "infoEmpty":      "Showing 0 to 0 of 0 entries",
    "infoFiltered":   "(filtered from _MAX_ total entries)",
    "infoPostFix":    "",
    "thousands":      ",",
    "lengthMenu":     "Show _MENU_ entries",
    "loadingRecords""Loading...",
    "processing":     "Processing...",
    "search":         "Search:",
    "zeroRecords":    "No matching records found",
    "paginate": {
        "first":      "맨처음",
        "last":       "마지막",
        "next":       "다음",
        "previous":   "이전"
    },
    "aria": {
        "sortAscending":  ": activate to sort column ascending",
        "sortDescending"": activate to sort column descending"
    }
}


반응형

+ Recent posts