Hi,
thanks for your question, and sorry for the trouble.
The problem here is that neither Google Drive Spreadsheets nor Dropbox offer a direct URL to a CSV file here, and thus there’s no direct access to the file that TablePress could use to import the file.
Dropbox puts a “Download the file” page before the actual download, and Google also shows the spreadsheet instead of directly delivering the file.
So, unfortunately, I don’t see a solution for those here π The FTP method is all that I can think of here, at this time. Sorry π
Regards,
Tobias
Thank you Tobias. I appreciate the fast reply, and figured that was the case.
I also tried using Amazon S3 and that did not work either.
Hi,
Amazon S3 should actually be possible. I haven’t tested it, but they deliver files over plain HTTP (without an intermediate download page like Dropbox), so that should work actually (if the file is publicly accessible there)…
Regards,
Tobias
Actually, using S3 did work, but there is a problem. When you update the file, the permissions are reset back to locked. You then need to grant “Everyone” Open/Download permissions again. It’s a possible solution.
Thank you again.
Oh, wait. You might be able to set bucket-level permissions…
You can set bucket-level permissions, but for some reason you still need to set permissions for the individual file. Then when you upload a replacement file with the same name, the file permissions are locked again.
I may be missing something…
Hi,
ah, that would be ugly… π I have never used S3, but this should not happen, I guess. You might want to contact Amazon’s S3 support about this. They will either be able to confirm this assumption, or show you the way how to set the permissions so that they don’t get reverted.
Regards,
Tobias
Update:
You can use Amazon S3. You need to create a new bucket for the information you want available via the web or the TablePress plugin. Then you need to edit the bucket policy by adding some code.
1 – Create the bucket
2 – Under Permissions (when the bucket is selected) you’ll see an Edit bucket policy button next to the Add more permissions button. Click to edit the bucket policy. A new window will pop up and you’ll add the following code for a bucket policy.
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::NAME.OF.YOUR.BUCKET/*"
]
}
]
}
Hit Save, and the files that you put into that bucket will be able to be read by the public.
3 – Upload your file into the bucket. I uploaded a .csv file including HTML in the cells to call images in my WordPress Media area. All work.
4 – Select the file, and look at the files Properties. You’ll see a secure link there that is not locked. Copy that link and use it as the URL “Source” in the Auto Import Tables section. Ensure the Auto Import is Active, and set the time.
Note that if you click on the Save Auto Import Configuration again, it should reach out to request the file again so you don’t have to wait the 15 minutes. Just refresh the page, and you’ll see a new time stamp under Last Auto Import.
Hi,
ah, very nice! Great to hear that you found the necessary S3 options for this! π
I hope that you can use this for the Auto Import according to your initial idea.
And yes, saving the Auto Import configuration will trigger an immediate re-import π
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
Tobias, how many hours would it take you to add in Google Drive Spreadsheet integration into the automatic periodic import plugin extension? This way, Google Drive can handle the friendly data input UI for the content creators, and your plugin can translate this to your powerful TablePress output. I think thousands of users would find this incredibly useful. Can we raise the money for you?
Hi,
this is hard to tell, unfortunately. I’m not familiar with the Google APIs there, so I simply can not estimate how much time or money this would take, sorry.
However, I’m not really sure that a special solution is necessary. You really only have to make sure that you are using the proper export link from Google, i.e. a link where the table is direcly accessible as CSV, for example. I’ve heard from a couple users now, that they only had to set the table to “public” for that.
Regards,
Tobias
Hi, I’d also subriscribe the petition about a direct connection between tablepress and gdrive spreadsheets… It would be really a great plus able to make your plug a php-like server db for dummies (like me).
anyway by now the easiest way i use is copy and past manually from the spreadsheet to the import box of tablepress (overwrite the existing tables…)…
The need I express about direct connection with gdrive is directly connected to the real appreciation of your plugin (i did my donation recently!!!)
bye Luca
Hi Luca,
thanks for your feedback on this! I do understand that this might be useful functionality for some people, but I don’t think that there’s enough interest/need for this by the majority of plugin users.
And unfortunately, I just don’t have the time and resources to first implement this, and then also support this functionality in the future. π
The Automatic Periodic Table Import Extension is all that I can offer here.
Maybe this plugin would be an alternative, if you really need the Google Spreadsheet integration: https://wordpress.org/plugins/inline-google-spreadsheet-viewer/ (I haven’t tested or used this before however.)
Regards,
Tobias