Okay
  Public Ticket #2775371
Problems with Formatting Table
Closed

Comments

  • Edward Keeley started the conversation

    Hi,

    I am having a problem with formatting a table I am building.  The data source is an excel file.  The data I am having problems with is percentages with two decimal places.  The data is formatted as "Percentage" in the source file.  The only way I can get it to display correctly on the table is to set the data type on the column to "string".  The problem is that I need it to be "Integer" or "Float" because I want to use conditional formatting to have the numbers change color based on certain ranges.  When I select Integer the decimal point is not in the correct position and when I select Float it is not displaying the number properly and adding zeros on the end.  I tried adding a "2" in the decimal places section when setting up Float but the decimal point is not in the correct place and it still adds extra characters.  I have attached a snip of the source file (It would not let me upload an excel file) and a snip of the result in wpDatatables.  In the snip, column's "FTR" and "PHT" are set to Integer and columns "PHT Pure Pass" and "Tech Sat" are set to Float.  The remainder are set to String and display properly but I cannot use conditional formatting to change the colors based on a range.   Do you have any suggestions?

  • [deleted] replied

    Hi Edward

    Thank you for reaching out to us.

    To add the percentage sign to your integer or float columns you can use the prefix/suffix options from the column settings, so you don't have to add it in your source file so the column can be read as integer or float.

    2310962458.png


    If there are zeros being added to your float columns please check if the number format in the wpDataTables is the same as in your source file as this can be causing the issue.

    7509785878.png


    If this doesn't help please send us the source file so we can test it locally. You can zip the file to be able to attach it or you can send us a link where we can download the file.

  • Edward Keeley replied

    Thank you.  Changing the number format in the main settings solved the problem.

    Thank you very much for your help.

  • [deleted] replied

    You are most welcomesmile.png

    I am glad to hear the issue is resolved.

    If there is anything else we can assist you with please don't hesitate to open a new ticket.

    Have a wonderful day!