2

I'm new to wordpress and it's features. I want to show some data like below image. I could make it with tablepress plugin, but if the source CSV file changes, the table values won't change.

How can I update a table value?

Thank you

the table

1 Answer 1

2

TablePress is simply a plugin that allows you to create tables without coding. You can upload a CSV, sure, but once it's uploaded, if you want the data to reflect the source CSV, you'll have to upload the updated CSV to that specific table in TablePress again.

Fortunately, TablePress makes this pretty easy with its replace feature.

  1. Click the Import tab on TablePress to import a new table
  2. Choose the input source (in your case a file upload)
  3. Choose the input source (in your case a CSV)
  4. Choose "Replace existing Table"
  5. Choose the table for which you want the data replaced.

This will, in effect, overwrite the data on that table. When you hit the Import button, anywhere on your website you utilize the shortcode for the specified table will be updated.

TablePress import and replace

Because there's no dynamic connection to the TablePress table and the CSV you uploaded (ie. database, constant PHP file reading, etc.) and TablePress doesn't know if you've updated the file (if you are using the file on server option, for example), you will need to tell it to update yourself.

Edit TablePress makes a premium plugin that will allow for the automatic import of data on a server at specified intervals. It's called Automatic Periodic Table Import and you can find that here.

2
  • thank you Ian, but it i want the "dynamically" way. Is there any plugin for that or I should use cron to read and update the table again?
    – mohammads
    Apr 2, 2017 at 5:58
  • Hi Mohammads, it appears that TablePress offers a premium plugin that seems to do exactly what you want. I updated my answer to include a link to that page. Take a look and hopefully that solves your issue :)
    – Ian
    Apr 7, 2017 at 2:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.