excelHtml5 and euro currency conversion
excelHtml5 and euro currency conversion
Bastiaan
Posts: 2Questions: 1Answers: 0
Hello,
I'm struggeling to export a table with euro currency values to Excel. The cells are exported as inlineStr and not as number. I'm able to convert the cell to '59', which stands for Euro currency but the cell type doensnt change to number type.
My questions:
- Should I add some kind of formatting to the html table td so excelHtml5 knows how what type of value is in the cell?
- If not, how can I change the inlineStr to number?
customize: function( xlsx ) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var twoDecPlacesCols = ['C', 'D'];
for ( i=0; i < twoDecPlacesCols.length; i++ ) {
$('row c[r^='+twoDecPlacesCols[i]+']', sheet).attr( 's', '59' );
}
console.log(sheet);
}
Many thanks in advance!
Bastiaan
This discussion has been closed.
Answers
It should actually work with the latest version of Buttons.
Can you link to a test case showing the issue please?
Allan
I have tried the new Buttons version but get an error:
I downloaded the buttons file locally and generated a new datatables with buttons exluded: