Это функция
Код: Выделить всё
function exportExcel() {
/**
* * Filename
* */
var fileName = 'Acc ' + currentDate + '.xls'
/**
* * Get the table
* */
const table = document.getElementById('table');
/**
** Clone the table and remove unnecessary celds from de new table
*/
var cloneTable = table.cloneNode(true);
jQuery(cloneTable).find('.noPrint').remove();
/**
* * Print all date celds for checking
* */
jQuery(cloneTable).find('.date').text(function(i, originalDate) {
console.log(originalDate)
})
/**
* * Remove spaces
* */
jQuery(cloneTable).find('td').text(function(i, originalText) {
const newText = originalText.trim()
return newText
})
/**
* * Create the wb
* */
const wb = XLSX.utils.table_to_book(cloneTable, {
sheet: 'Hoja 1'
});
/**
* * Exportar the file
* */
XLSX.writeFile(wb, fileName);
}

И это вывод консоли, соответствующий верхнему.

Как видите, значения совпадают.
Это результат в Excel

Некоторые форматы не совпадают, некоторые даты также не совпадают, и Я не понимаю почему.
Подробнее здесь: https://stackoverflow.com/questions/784 ... s-and-xlsx
Мобильная версия