Excel export is not exporting the values as it is from datatables

Excel export is not exporting the values as it is from datatables

v3nkyv3nky Posts: 46Questions: 11Answers: 0

I have datatable where it holds many columns with decimal values. my application is being used by German users.

Here is a small example where I have an issue.

A B
70.000,00 700,00

When I export this datatable using excel export, I am getting the below result.

A B
-- ----
70.000,00 70000

Here I am getting incorrect value in B column . It is not treating , as decimal where as it must be in German Format. Instead it is treating it in English format and showing it as 70000 instead of 700. Somehow unfortunately column A is showing with an error and hence it is not changing the format. Please help me here how can i fix this issue.

Answers

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

    Hi @v3nky ,

    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

  • v3nkyv3nky Posts: 46Questions: 11Answers: 0

    I tried creating test case but unfortunately Export Buttons are not appearing.

    Please check this and help me here http://live.datatables.net/fivogixu/1/edit

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    The browsers console shows this error:

    TypeError: Cannot set property '_DT_CellIndex' of undefined

    You have 7 columns defined in columns but there are only 6 in the table. I commented one of the columns and now the buttons appear:
    http://live.datatables.net/fivogixu/2/edit

    They appear as links which is probably due to not loading Bootstrap. This is what I get with the Excel export:

    Salary
    9,00
    700,00
    70.000,00
    

    Which looks correct.

    Kevin

  • v3nkyv3nky Posts: 46Questions: 11Answers: 0

    Thank you I will check . In between table header is not able to take german characters.Please check the below output.

    Name Position Office Age Start date TSG_JÄHRLICHE_VERWALTUNGSGEBÜHR_PRO_VERBAND
    Ashton Cox Technical Author San Francisco 66 1/12/2009 9,00
    Garrett Winters Director Edinburgh 63 7/25/2011 700,00
    Tiger Nixon System Architect Edinburgh 61 4/25/2011 70.000,00

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

    Would you be able to update your test case to show this one, please.

This discussion has been closed.