I am using the below option to create a new table that lives in my sql db. the data comes from a google sheet. however, the auto-refresh doesn't seem to work. I have set a refresh number of seconds, but nothing happens.
Create a data table by importing data from a data source.
Excel, CSV, Google Spreadsheet. Data will be imported to the database, the table can be edited in WP admin, or made front-end editable.
I am not 100% sure i understood what you tried in this use-case.
If you are trying to import the data from the Google Sheet, but to keep the source Sheet changes linked with our table at the same time, that is not possible.
I guess what confused me is that I filled in the auto-refrsh timer and so expected it to refresh.
Any ideas how I could achieve what I'm trying to do? I have post data in my sql. I have updating weather data every 8 hours in google sheets. I need to combine the two to produce this table and have it refresh multiple times a day.
An alternative would be if I could make an API call directly to the weather provider using an http csv link like this...
In my google sheet, each api call retrieves a day 5 forecast for that hike.
I guess, if you could somehow get source data to go through an API or JSON source, here is what you could try :
1. If you link the table to a JSON file, this file has to have structure as we pointed out on this documentation. I will copy the important part here :
Currently, wpDataTables accepts this, and only this format of JSON (see example on the docs page):
a one-level array of same-structured objects where each object will be parsed as a row, and each field inside of the object as a cell.
-
If your software does not return this format, you would need to prepare, for example, some PHP adapter to return one of the formats that wpDataTables would accept.
-
2. If your JSON file has multiple levels, then you will have to try our NESTED JSON method.
3. If you wish to use API, and to pull data from it, then you will have to adapt it to PHP Array, and make a table linked to PHP Array.
I am using the below option to create a new table that lives in my sql db. the data comes from a google sheet. however, the auto-refresh doesn't seem to work. I have set a refresh number of seconds, but nothing happens.
Create a data table by importing data from a data source.Excel, CSV, Google Spreadsheet. Data will be imported to the database, the table can be edited in WP admin, or made front-end editable.
Hi, seb.
I am not 100% sure i understood what you tried in this use-case.
If you are trying to import the data from the Google Sheet, but to keep the source Sheet changes linked with our table at the same time, that is not possible.
We will elaborate on this method.
When you import the data from a Google Spreadsheet,
this makes a new Manual Table in your database.
It loses any connection from the source Spreadsheet.
That table will be editable in our plugin, and you can also make SQL Tables from it.
But, in the moment when you import this data, it loses any connection/synchronization with the source Google Spreadsheet;
so any change you make on the Google Spreadsheet is not going to show in the table.
-
If you edit this new Manual ( imported) table from our plugin or in your SQL Database with PHPMyAdmin,
that will show in the table;
but any editing on the Google Sheet will not show.
Later on, you can update the Manual Table by uploading the updated Google Sheet again, if you wish.
-
The only way to keep the link between a source Sheet and the table, is with the other "linked method".
This way any editing on the source Sheet will show in the output table,
but it won't make a new SQL table in the database, and it is not editable from our plugin.
Let me know if i perhaps misunderstood the use-case and if you have any questions. Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
that makes sense.
I guess what confused me is that I filled in the auto-refrsh timer and so expected it to refresh.
Any ideas how I could achieve what I'm trying to do? I have post data in my sql. I have updating weather data every 8 hours in google sheets. I need to combine the two to produce this table and have it refresh multiple times a day.
An alternative would be if I could make an API call directly to the weather provider using an http csv link like this...
In my google sheet, each api call retrieves a day 5 forecast for that hike.
Hi, seb.
Sorry for the delay.
-
That is a bit of a tricky use-case, to be honest.
I guess, if you could somehow get source data to go through an API or JSON source, here is what you could try :
1. If you link the table to a JSON file, this file has to have structure as we pointed out on this documentation. I will copy the important part here :
Currently, wpDataTables accepts this, and only this format of JSON (see example on the docs page):
a one-level array of same-structured objects where each object will be parsed as a row, and each field inside of the object as a cell.
-
If your software does not return this format, you would need to prepare, for example, some PHP adapter to return one of the formats that wpDataTables would accept.
-
2. If your JSON file has multiple levels, then you will have to try our NESTED JSON method.
3. If you wish to use API, and to pull data from it, then you will have to adapt it to PHP Array, and make a table linked to PHP Array.
I hope this helps.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables