how to set Date format with dd/mm/yyyy in js-xlsx plugin -
i using js-xlsx plugin export datatable excel file.
reference : https://github.com/sheetjs/js-xlsx
here code
var activelist = $scope.datalist[$scope.activedatalist.value]; var worksheet = xlsx.utils.table_to_book($("#data-table-grid")[0]); var wopts = { booktype: 'xlsx', booksst: false, type: 'binary', celldates: false }; var wbout = xlsx.write(worksheet, wopts); function s2ab(s) { var buf = new arraybuffer(s.length); var view = new uint8array(buf); (var = 0; != s.length; ++i) view[i] = s.charcodeat(i) & 0xff; return buf; } saveas(new blob([s2ab(wbout)], { type: "application/octet-stream" }), 'report ' + activelist.title_en + '.xlsx'); return wbout;
my output :
how display date cell in dd/mm/yyyy format ? per documentation displays m/dd/yyyy. kindly help
Comments
Post a Comment