I'm trying to create a table (and accompanying chart) showing average salaries in the UK by age.
I've managed to import all the data correctly from Excel, but am having problems with formatting.
A screenshot of the table is attached.
All the data in there is currently formatted as strings. While I think this is fine for the age bands, the salary data needs to be recognised as numbers in order for any charts to be built from the data.
The problem is that converting any of those columns to floats or integers means the columns revert to showing '0' values. Currently, the data in the underlying Excel is in currency format (which includes a '£' symbol), so that formatting seems to pull through when formatted as a string in wpdatatables. However, if I change the formatting in the Excel to a number format, although the numbers pull through OK to the wpdatatables table, I can't then change the formatting in wpdatatables to make them look like currencies.
Do you know how I can ensure the data is both recognised as a number (for charting) and also is displayed as a currency?
Yes that is because numbers contain a string value like ($,€...) and datatables treat it like string. If you need to show numbers as integer or float but still have the currency sign please remove the currency sign from the source file and also empty values as - and when you create table you can add cell prefix or suffix in column settings.
I hope this helps, please don't hesitate to contact us if you need any further assistance.
If you have any other issue or question please open new ticket, and we help you out.
I’d like to ask you a favor. Would you mind taking a few minutes to write a review for us, please on this link?
Our free version is the only place where we can have proof for our hard work; your comments are beneficial for others to know what to expect when they’re looking for our plugin.
Thank you in advance. It means a lot to us, and I am looking forward to reading your comment.
Hello,
I'm trying to create a table (and accompanying chart) showing average salaries in the UK by age.
I've managed to import all the data correctly from Excel, but am having problems with formatting.
A screenshot of the table is attached.
All the data in there is currently formatted as strings. While I think this is fine for the age bands, the salary data needs to be recognised as numbers in order for any charts to be built from the data.
The problem is that converting any of those columns to floats or integers means the columns revert to showing '0' values. Currently, the data in the underlying Excel is in currency format (which includes a '£' symbol), so that formatting seems to pull through when formatted as a string in wpdatatables. However, if I change the formatting in the Excel to a number format, although the numbers pull through OK to the wpdatatables table, I can't then change the formatting in wpdatatables to make them look like currencies.
Do you know how I can ensure the data is both recognised as a number (for charting) and also is displayed as a currency?
Kind regards,
Andrew
Hi Andrew
Thank you for reaching out to us.
Yes that is because numbers contain a string value like ($,€...) and datatables treat it like string. If you need to show numbers as integer or float but still have the currency sign please remove the currency sign from the source file and also empty values as - and when you create table you can add cell prefix or suffix in column settings.
I hope this helps, please don't hesitate to contact us if you need any further assistance.
Hi Blaženka,
That's worked perfectly, thank you.
I changed the source data to number format, then added the prefix in column settings.
Thank you,
Andrew
You are most welcome
If you have any other issue or question please open new ticket, and we help you out.
I’d like to ask you a favor. Would you mind taking a few minutes to write a review for us, please on this link?
Our free version is the only place where we can have proof for our hard work; your comments are beneficial for others to know what to expect when they’re looking for our plugin.
Thank you in advance. It means a lot to us, and I am looking forward to reading your comment.