I have WebApp, which collects workplace data in a Google Sheets spreadsheet, and also collects photos of a work site in the Google Drive folder that I create for each job. Some photos, but not all, must be displayed in a cell in Google Sheets so that the sheet can be printed as part of a job completion report.
I use Google Picker to upload files to a job-specific folder. I do not know how best to use them from there.
I had success setting the cell formula, for example =IMAGE("hllp://i.imgur.com/yuRheros.png", 4, 387, 422) , but only with images pulled from other places on the Internet.
Using a permalink trick like this =IMAGE("hllp://drive.google.com/uc?export=view&id=0B8xy-TdDgbjiFoOldUlLT091NXM", 4, 387, 422) does not work; I think that he will not tolerate the URL redirects that Google does on these links.
Another way I read, but have not tried it yet, is to write the actual blob into a cell. However, I suspect that I will lose control over the subsequent formatting of the report.
I may need to write the image specification in several ways in several cells:
- Drive hash
- its dimensions
- its alternate location at imgur.com (or similar)
- his blob
Is there a programmatic way to get the Google redirect URL for the image, which is equivalent to opening the image and manually copying the URL? Can you trust him forever or change over time?
Update : I am wrong about = IMAGE ("hllp: //drive.google.com/uc? Export = view & id = 0B8xy-TdDgbjiFoOldUlLT091NXM", 4, 387, 422) not at work. It is very important that the image be transferred to โanyone with a linkโ, even if the owner of the table also owns the image.
I am going to record with recording only 1.hash key and 2.dimensions as my solution, but I would be glad to know if anyone has any better idea.
google-spreadsheet google-drive-sdk google-apps-script google-picker
Martin bramwell
source share