excel in numbers format in mac showing blank data

excel in numbers format in mac showing blank data

prasadhari009prasadhari009 Posts: 28Questions: 7Answers: 0

Excel file data not showing in numbers format in mac os

please see below link

https://www.zamzar.com/uploadComplete.php?convertFile=xls&to=numbers&session=bc77e69dc183714b5a3789e8fe4a3fff&email=false&tcs=Z80

please help

thanks
hari

Answers

  • colincolin Posts: 15,240Questions: 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

  • prasadhari009prasadhari009 Posts: 28Questions: 7Answers: 0

    hi colin ,

    My doubt is i downloaded excel and try to open with numbers in apple mac system

    eg Advance Balance Report (26).numbers

    after opened that excel it showing blank sheet..

    there is any settings to get data in excel with numbers in mac os

    any idea please share

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

    Try this example here. It'll work, which means the problem is with your implementation, hence why I asked for a test case or a link to your table. Without that, we can't progress this,

    Colin

  • prasadhari009prasadhari009 Posts: 28Questions: 7Answers: 0

    hi thanks for your reply

    as you said I checked this url in my mac system

    https://datatables.net/extensions/buttons/examples/initialisation/simple.html

    excel shows data in number format successfully

    and I used same version of js and cs files what you mentioned in above example

    but its not worked for me

    here is my code

    $('#tblAccrual').DataTable({
    columnDefs: [],
    "order": [],
    paging: true,
    searching: true,
    "aaSorting": [],
    "ordering": false,
    dom: 'lBfrtip',

                buttons: [
                    $.extend(true, {}, null, {
                        extend: 'excel', footer: true,
                        extension: '.xlsx',
                        title: "Accrual Report",
                        text: '<i class="fa fa-file-excel-o fa-2x"></i>',
                        titleAttr: 'Excel',
                        // pageLength: true,
                        exportOptions: {
                            format: {
                                body: function (data, row, column, node) {
                                    //culture data format in body
                                    return 'NIM' ? '\u200C' + data : data;
                                },
                                footer: function (data, row, column, node) {
                                    //culture data format in footer
                                    return 'NIM' ? '\u200C' + data : data;
                                }
                            },
                            modifier: {
                                // DataTables core
                               // order: 'index',  // 'current', 'applied', 'index',  'original'
                                page: 'all',      // 'all',     'current'
                               // search: 'none'     // 'none',    'applied', 'removed'
                            },
                            columns: ':visible'
                        },
                        action: function (e, dt, node, config) {
                            ////console.log("dt=>", dt, node, config);
                            config.filename = "Accrual Report";
                            $.fn.DataTable.ext.buttons.excelHtml5.action.call(this, e, dt, node, config);
                        }
                    })
    

    ]
    });

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

    Yep, as I said, we need to see the issue, so please provide a link to a table that demonstrates the issue,

    Colin

  • prasadhari009prasadhari009 Posts: 28Questions: 7Answers: 0
    edited December 2020

    hi colin,

    Finally I found the issue

    numbers in mac not support the below format

    format: {
    body: function (data, row, column, node) {
    //culture data format in body
    return 'NIM' ? '\u200C' + data : data;
    },
    footer: function (data, row, column, node) {
    //culture data format in footer
    return 'NIM' ? '\u200C' + data : data;
    }
    },

    when i removed the above format,

    the excel in numbers in mac showing data as usual..

    so please suggest any alternate solution instead using above formate....

    thanks

    hari

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954

    Using \u200C seems to work in this example on a Mac:
    http://live.datatables.net/tupelexu/8/edit

    As Colin asked please provide an example that shows the problem you are having.

    Kevin

  • prasadhari009prasadhari009 Posts: 28Questions: 7Answers: 0

    Finally I used below format

    format: {
    body: function (data, row, column, node) {
    //culture data format in body
    data = data.replace(/<.*?>/g, "");
    return 'NIM' ? '\u000F' + data.replace(/ /gi, ' ') : data;
    },
    footer: function (data, row, column, node) {
    //culture data format in footer
    return 'NIM' ? '\u000F' + data.replace(/ /gi, ' ') : data;
    }
    },

    the excel in numbers format in mac system working fine and data shown as it is.....

This discussion has been closed.