These notes demonstrate the WordPress wpDataTables plugin using a simple worksheet exported from Excel and which provides a simpler online alternative to traditional databases. Once imported into WordPress, the table is stored in the same  MySQL database containing the WordPress application and, at the discretion of the site administrator, may be updated by nominated Users from within this page. Data can be imported from several sources but at this stage, it is NOT recommended to use Google Sheets as its data can only be updated from within Google Sheets and there can be a 15 minute time lapse before the data is presented to the web page. We have successfully created tables from Excel and CSV (comma separated variable) files and a wpDataTable using an MySQL query.  Note that adding a sum in sum row for formula columns is not yet supported.

JC Sales Demo

wdt_ID Month Hats Ties Socks Hankies Pants Monthly Total
1 Jan 135 606 619 566 759 2,685
2 Feb 98 166 984 49 726 2,023
3 Mar 192 115 454 850 166 1,777
4 Apr 257 824 367 684 595 2,727
5 May 274 629 943 137 935 2,918
6 Jun 525 985 191 129 328 2,158
7 Jul 608 20 376 908 529 2,441
8 Aug 728 302 534 100 775 2,439
9 Sep 779 516 492 813 441 3,041
10 Oct 904 158 443 497 231 2,233
Month Hats Ties Socks Hankies Pants
∑ = 4,500 ∑ = 4,321 ∑ = 5,403 ∑ = 4,733 ∑ = 5,485
Avg = 450.00 Avg = 432.10 Avg = 540.30 Avg = 473.30 Avg = 548.50
Min = 98 Min = 20 Min = 191 Min = 49 Min = 166
Max = 904 Max = 985 Max = 984 Max = 908 Max = 935

IMPORTANT – The chart below is derived from the above table and should update automatically when the table values are changed. To change the chart type, you must update using wpDataCharts and after update, copy the shortcode to this page. This chart has been rendered using the chart.js render engine. Note that the three engines display different chart types and parameters, and follow data filtering must be selected to allow interactive update.

Experiment with the various icons and update the data table values to appreciate the value of this resource. For example, the columns icon allows Users to omit columns from the display, or filter on any column by entering a filter value. Finally, click the Excel icon to download the updated table as an Excel spreadsheet or, alternatively, click the Download Report button to download the spreadsheet into a formatted Excel template.

Close Menu
PHP Code Snippets Powered By : XYZScripts.com