Okay
  Public Ticket #3448060
Float values
Closed

Comments

  • Steve Carter started the conversation

    Hello,

    I am trying out wpDataTables but am having issues pulling float values into the table.

    I used a CSV as well as an Excel file and get the same problem.  I have a price field which has 2 decimal places.  When I import the file a value that was 4.50 comes in as 45,00.  I have tried fields with 4.5, .45, .045 and .0045 and they all get imported as 45,00.

    I would be grateful if you could let me know how I should proceed.

    Please see this video of the issue here 


    Thanks

    Steve

  •  1,819
    Miloš replied

    Hi Steve.

    1. Can you please first check what is your Number Format in the main Plugin settings?

    If it is with the comma as decimal separator, change it to the other one.

    8774440086.png

    Then, as far as i can see in your source file, it should be 4 decimals?

    I just made the same numbers as you shown in the Video, like this in my source file :

    7777606938.png


    So, if i am seeing it correctly, for example the first number is four, then the dot decimal separator, and the decimals are  "5000"?

    In that case the 4.5000 should be 4 decimal places, and the Number Format as dot for the decimal separator.

    Here is how it looks in my Settings :

    1655712739.png
    8034291918.png

    And now, if i link a new table to this source file,  the table cells will be like this ( the same as from the source) :

    7944408005.png
    9181645330.png



    -

    And another important note for working with Excel,

    when inputting data for Floats, it is best to format all the data as 'plain text' , to avoid formatting issues.

    Because for example, when i started inputting my Excel values on the source, they first did not appear correct,

    then i change format from "number" to "text" and then it worked.


    Let me know if that helps?

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables