data imported from excel dont have comma separator on thousands

data imported from excel dont have comma separator on thousands

puyodmarlonpuyodmarlon Posts: 1Questions: 1Answers: 0

I have imported an excel file to datatable, but after i have uploaded it the data like thousands and millions dont have comma separator, anyone can help me please

Answers

  • arcanisgkarcanisgk Posts: 41Questions: 12Answers: 0

    Hi, I think you will need to work much more with datatable.net there are many things that can be done but that are not easy or are not described ...

    Let's see if I can help you get back on the development path:

    https://datatables.net/reference/api/rows.add()

    https://datatables.net/reference/api/row.add()

    https://datatables.net/examples/advanced_init/row_callback.html

    you need to create a function; to work on the callback and perform the analysis of the data you are importing.

    this is an example:

    var table = $('#example').DataTable();
    
    table.rows.add( [ {
            "name":       "Tiger Nixon",
            "position":   "System Architect",
            "salary":     function (data) {
                /* your function */
                },
            "start_date": "2011/04/25",
            "office":     "Edinburgh",
            "extn":       "5421"
        }, {
            "name": "Garrett Winters",
            "position": "Director",
            "salary": "$5,300",
            "start_date": "2011/07/25",
            "office": "Edinburgh",
            "extn": "8422"
        } ] )
        .draw();
    

    You can also use renders:

    https://datatables.net/manual/data/renderers

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

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.