Starting from wpDataTables version 1.7, an Excel-like spreadsheet editing interface is available both for back-end and front-end editing and for displaying tables to your site users. As Excel, LibreOffice, Google Spreadsheet is a very familiar interface to most of the users, this is a very handy feature – especially for statistical, financial data, for cases when you or your users need to type in a lot of strings or numbers; you can navigate with arrows and do not need to scroll or click to fill in every cell, also it is very useful when you need to copy&paste data (e.g. from and to Excel, Google Spreadsheets, LibreOffice, OpenOffice, or other spreadsheet software). Excel-like editor supports all the wpDataTables editor input types.
Any editable table (both created with the Table Constructor, or manually configured) can be edited via Excel-like editor.
See a demo in our Sandbox.
Let’s go through creating such a table from Table Constructor. Go to your WordPress admin panel, open “wpDataTables -> wpDataTable Constructor“:
You can choose both “I would like to prepare structure and input all the data manually” or “I would like to read the initial table data from an input file or Google Spreadsheet” options to create editable tables, but we will go with the first one – manual creation, and click “Next”:
In the next screen we need to configure the columns. Wecreated the following columns: “Company name” (string), “January“, “February“, “March“, “April” (floats). When the columns are added we can specify the new table’s name, and click “Create the table and open in Excel-like editor“:
When the loading finishes, you will see a back-end Excel-like editor with an empty table:
You can start typing in the values, navigating with arrows and Enter button, as if you were editing the table in Excel, or Google spreadsheets:
If you need to have same or similar values in many rows, you can save some time by selecting the block you’d need to repeat, and just drag using the small blue square in the bottom right to expand/clone it to the amount of rows that you want:
You can copy&paste blocks from Excel-like tables to almost any spreadsheet software, and vice versa (but please watch that source table would have the same column structure).
The Excel-like table editor has built-in validation that works accordingly to the selected column type and editor input type. E.g. if you try to enter a string in a Float or Date column, it won’t let you:
At any moment you can switch between the standard wpDataTables back-end editor and Excel-like editor – the data will remain the same:
Excel-like editor supports searching and sorting. However not all of wpDataTables features are for the moment supported by the Excel editor interface, please click here to see the full list of limitations (we are working on removing those limitations for future versions).
Excel-like interface can be also used in front-end, click here to see how.