Excel Export Column Customize Format

Excel Export Column Customize Format

ibrahimayhanibrahimayhan Posts: 13Questions: 0Answers: 0

Hi,
I'm Transferring to Excel as follows,
Number 5 Digit Character L is on Column,
Here I want to do formatting as follows,
5,2167
Must be 4 characters after the comma,
How Can I Convert This Format ?
My function is as follows,

$(document).ready(function () {
$('#CariHesapHareketleri').DataTable({
buttons: ['copy', 'csv', 'excel', 'print',
{
extend: 'excel',
text: 'Testing Excel',
customize: function (xlsx, row) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="L"]', sheet).attr('s', 0);
}
}
]
});
});

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @ibrahimayhan ,

    I would use orthogonal data - see example here. You can format the data before it goes into the spreadsheet.

    You can also change the style in the spreadsheet - see example here.

    Both would be good places to start.

    Cheers,

    Colin

  • ibrahimayhanibrahimayhan Posts: 13Questions: 0Answers: 0

    Hi @colin
    the datatables are seen smoothly on as I want,
    Excel is a problem in the currency transfer where I extracted,
    on my datatables it looks as follows
    how can i transfer as shown on excel ?
    there are 4 characters long after the comma

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Have you tried the suggestions in my previous reply?

  • ibrahimayhanibrahimayhan Posts: 13Questions: 0Answers: 0

    I don't understand exactly how to use it
    data comes from dataset
    I want transferring as in datatables ?

This discussion has been closed.