• Resolved andreulloveras

    (@andreulloveras)


    Hello,

    I have a problem with excel button. I’m using a CSV file in server who is autoimported every day with the list of my products prices. The problem is that i use the Tablepress Buttons extension with the CSV, EXCEL and PDF format. When i use the Excel button it downloads an excel without decimals, so if my csv price is 192,56, in the web version of tablepress it appears like 192,56 but in the excel download it appears as 19256.

    How can i fix this? Can i do something to my csv?
    THank you in advance!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    How do these numbers show up in the various places:
    – The CSV file that is imported (opened in a text editor)?
    – The “Edit” screen of the table?
    – The frontend version of the table?
    – The exported/saved CSV file (opened in a text editor)?
    – The exported/saved Excel file (opened in a text editor)?

    Regards,
    Tobias

    Thread Starter andreulloveras

    (@andreulloveras)

    I answer you at the end of every question:

    How do these numbers show up in the various places:
    – The CSV file that is imported (opened in a text editor)? Correct. Separated with comma
    – The “Edit” screen of the table? Correct. Separated with comma
    – The frontend version of the table? Correct. Separated with comma
    – The exported/saved CSV file (opened in a text editor)? Correct. Separated with comma
    – The exported/saved Excel file (opened in a text editor)? Incorrect. Not separated.

    Thank you in advance Tobias!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for checking all this!

    That’s really strange then. I can only assume that the DataTables JavaScript library (which TablePress uses for that Excel button) has a bug then…
    Your best chance probably is to turn off the Excel button and use the CSV button instead. CSV files can also be opened in Excel without problems.

    Regards,
    Tobias

    Thread Starter andreulloveras

    (@andreulloveras)

    Thank you Tobias,

    Is there any way to change the text in the “CSV button” to appears as “Excel”? My customers are not used to use CSV so they don’t know what it is. If the button says “EXCEL” and download a CSV but opens in excel its all solved.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that should be possible. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? I can then try to find the necessary code change.

    Regards,
    Tobias

    Thread Starter andreulloveras

    (@andreulloveras)

    Hi,
    Yes you can check it on
    https://www.arpgirona.com/_a

    You can use any table except “Royal Canin – Botiga” and “Royal Canin – Clinica”
    I used Versele Laga -VL- for the example (You can check that all are the same table except the two that i mentioned before, I use the filter plugin in your website to filter providers)

    thank you.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok, thanks!

    To change the CSV button to Excel, please change your Shortcode parameter for the Buttons Extension by also removing the excel from it.

    Then, add this to the “Custom Commands” textfield on the “Edit” screen of the table:

    "buttons":[{extend:"csv",text:"Excel"},"pdf"]
    

    Regards,
    Tobias

    Thread Starter andreulloveras

    (@andreulloveras)

    Hello!

    I solved it changing the AutoImport file, I was autoimporting the table from a csv file and the excel exportation does what I explained to you before.
    Now I export the sql table in xlsx and Autoimport the xlsx file and its solved, the decimals appear correclty at the export.

    Thank you!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok. Good to hear that you found a solution then ??

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Problem with Excel Button’ is closed to new replies.