Automatic Periodic Table Import

Periodically update tables from a configured import source.

Many people like maintaining their tables in common spreadsheet applications, like Microsoft Excel, or online services like Google Sheets, Excel Online, or Dropbox, as they are familiar with their editing user interfaces. From there, they manually import the table into TablePress, to update it on their site.

The “Automatic Periodic Table Import” feature module can make this process faster and easier! It only needs to be configured once and will then periodically import a file from the server or a URL and replace the existing table with the data from the file. This saves time and allows updating tables without having to log into your WordPress site!

Feature description

When using this Module, the “Import” screen in TablePress will have a new section for the automatic periodic import of tables. There, you can configure the import source for each table and also set how often you want the import to happen, from “Once per minute”, “Every 15 minutes”, “Once per hour”, and similar choices — or just set your own interval or cron-like schedule.

Whenever the configured time interval has passed, TablePress will automatically import a table from the source again. With this method, you’ll just have to keep the source file up-to-date, e.g. by copying a new CSV file to the server via FTP or by update a table in Google Sheets, Microsoft Excel Online, or Dropbox.

In addition, you can trigger an immediate import of the table from the configured source by clicking the “Run now” button that is shown when hovering a row with a configured table. In the screenshot above, you can see this in the first row, for the “Stock List” table. This can greatly speed up the table import process, as the sometimes annoying step of finding the correct import source for a manual table import won’t be needed anymore.

Starting with TablePress 3.0, the “Automatic Periodic Table Import” module also has a failure notification feature: Whenever an automatic import of a table fails, e.g. due to a source server not being reachable or reached server resource limits, the import will automatically be rescheduled, and TablePress will send notification emails to e.g. the site’s administrator or other people. This improvement greatly improves the the reliability of this feature for business-critical tasks.

Usage instructions

To use the “Automatic Periodic Table Import” feature with your tables, enable the module on the TablePress “Modules” screen, which you will see after upgrading your site to the TablePress Max license plan.

Then, configure the desired import sources and intervals in the “Automatic Periodic Table Import” section on the “Import” screen of TablePress. You can either choose an existing numeric interval or time period or configure a cron-like schedule via the “Custom” setting. These schedules allow configuring specific timepoints for an automatic import. For example, “At 8:15am, every Monday-Friday” can be written as

15 8 * * 1-5Code language: plaintext (plaintext)

Crontab guru is great tool to derive these expressions and to understand them better.
Note that the cron schedules need to be configured with UTC as the timezone.

To trigger an immediate import of a table, you can also use the “Run now” button at the end of the table’s row.

If you want to be notified whenever an automatic import fails and was rescheduled, open the “Failure Notification Settings” panel and configure the desired error notification levels and add the recipients’ email addresses.

Please note: In general, it is recommended to use reasonably long intervals, to reduce traffic on the import source server. In addition, it is recommended to set up a suitable server cron job that replaces the WP Cron system, for improved reliability. For details and instructions on this, see this WordPress Support Article. The support team of your hosting company should be able to help with the specific configuration on your site or server.

Also note that most servers save a so-called “revision” of each table in the database whenever it is updated. This can lead to large databases. It is therefore recommended to limit the amount of revisions in the database, e.g. by setting the WP_POST_REVISIONS constant to a small number in the site’s wp-config.php file. For more information and instructions on this, please see this WordPress Support Article.