Download embeded google sheets - google-sheets

as I'm not a web developer by any means, this is me just asking a question for that I have not found a solution for.
I have a google sheet with multiple pages/sheets within it. the file is embeded in an iframe inside a webpage and I pulled the url and can open it directly using the url. the following link is just an example as I can't share the actual link since I am not allowed to:
https://docs.google.com/spreadsheets/d/e/{key}/pubhtml?widget=true&headers=false
I have tried this:
https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key={key}
and is not working I get an error:
Sorry, unable to open the file at present.
Please check the address and try again.
the file is not meant for anyone to download nor share. Furthremore, since it is continuosely manually updated by author and I need to keep track of updates, taking screenshots is not efficient since the file is too big.
is there any way I can download the actual sheet to my device (so I can compare file updates over the long run)
Thank you.

I believe your goal as follows.
You want to download a Google Spreadsheet.
You are the owner of Google Spreadsheet.
The Spreadsheet is published as the Web publish. So the URL of Spreadsheet is https://docs.google.com/spreadsheets/d/e/2PACX-1vTl9bcwMSjoxYj406evzJefFodkVEUlV2KIq34Y5V8BFWJygAFrPSA7L5d89TASDUjkPG4b2SfN2rpe/pubhtml?widget=true&headers=false.
Issue and workaround:
Unfortunately, the Google Spreadsheet cannot be directly downloaded as the Google Spreadsheet. It seems that this is the current specification. In this case, it is required to export the Google Spreadsheet as other mimeType. For example, it's XLSX format, PDF format and CSV format. But the URL of https://docs.google.com/spreadsheets/d/e/2PACX-1vTl9bcwMSjoxYj406evzJefFodkVEUlV2KIq34Y5V8BFWJygAFrPSA7L5d89TASDUjkPG4b2SfN2rpe/pubhtml?widget=true&headers=false cannot directly export. So, in this answer, as a workaround, I would like to propose to use the URL for exporting Google Spreadsheet as other mimeType.
When your URL is used, the URL for exporting is as follows.
Modified url:
https://docs.google.com/spreadsheets/d/e/2PACX-1vTl9bcwMSjoxYj406evzJefFodkVEUlV2KIq34Y5V8BFWJygAFrPSA7L5d89TASDUjkPG4b2SfN2rpe/pub?output=xlsx
In this case, when you access to above URL using browser, your Spreadsheet can be exported as a XLSX file.
When output=xlsx is modified to output=pdf and output=csv, you can export as a PDF file and a CSV file, respectively.
When you want to export the specific sheetm please use the sheet ID like gid=0. The URL is as follows.
https://docs.google.com/spreadsheets/d/e/2PACX-1vTl9bcwMSjoxYj406evzJefFodkVEUlV2KIq34Y5V8BFWJygAFrPSA7L5d89TASDUjkPG4b2SfN2rpe/pub?output=xlsx&gid=0
Note:
When you want to make users downloading the Spreadsheet, you can add the tag a as follows.
Download

Related

Parameter portrait=true doesn't work for Google Sheets Publishing PDF functionality

I have published one of my sheets to download it in pdf:
https://docs.google.com/spreadsheets/d/e/2PACX-1vSltr5HBmYtYSYoMeOdzk0G7LDbu430OXD8dMbX47BJq-qrXGRqAi0o_AB888VFaw6SDx/pub?gid=1095430144&single=true&output=pdf
I'm trying to change the pdf orientation using portrait=true URL parameter like this:
https://docs.google.com/spreadsheets/d/e/2PACX-1vSltr5HBmYtYSYoMeOdzk0G7LDbu430OXD8dMbX47BJq-qrXGRqAi0o_AB888VFaw6SDx/pub?gid=1095430144&single=true&output=pdf&portrait=true
But it doesn't work.
Any ideas on how to solve this?
Use the export link instead of publishing to the web
Since you want to convert your sheet to a pdf and download it instead of opening it in the browser, you can simply export it.
The export URL accepts the portrait=true parameter.
The export URL would look as following:
https://docs.google.com/spreadsheets/d/FILE_ID/export?exportFormat=pdf&format=pdf&portrait=true
Keep in mind that FILE_ID is the file id that you can find in the sheet URL:
https://docs.google.com/spreadsheets/d/FILE_ID/edit#gid=0
FILE_ID is different than the publishing to the web id (the latter starts with 2PACX-)
When exporting the sheet as pdf, portrait=true is actually not necessary, because the sheet will be exported as portrait by default

new google site - How to upload a pdf

I would like to upload the pdf of a paper on my new google site. Specifically, I want that people can click on, say, "paper_title" and can visualize the pdf and, if they want, download it.
I would like if possible a step-by-step explanation.
Thanks!
This is fairly straightforwards:
Firstly, store the PDF files on Google Drive and, set the link sharing as appropriate (e.g. anyone with link can view) so even anonymous internet users can see the file.
To make the PDF available via Google Sites you can either:
From Drive, copy the link to the file, and in new Sites insert a text box and
include the hyperlink to the PDF file in the text box.
in new Sites Insert (From Drive) and select the PDF file from the Google Drive; gives the same result as above, but with a re-sizable thumbnail picture of the PDF file instead of a link.
Exactly what happens after they click on the link is going to depend upon what browser the user is using, and what (if any) PDF viewer plugin is installed. Chrome, pretty much does what you want: it opens the PDF file in a viewer, from where you can download it.
Even if you don't store the PDF on Google Drive, what is described above should still work, as long as you have a hyperlink to the PDF file.

Send Excel files to Office for editing and read changes

Right now I have an Excel file locally in my iOS application and the file is downloaded from our own servers.
I want to be able to edit the Excel file somehow and I can't seem to get my head around how to do it with the Excel app.
I'm aware that you can't edit local files in another app like that, so I tried with links to files on my OneDrive account. I just can't seem to get the url right.
It seems like I need a direct link to the file, but all I get is a guest access link, when I make the file shareable.
Have you tried the Google Sheets app? Might do the trick.

Google sheets Hyper links to folders not working

I am trying to migrate an Excel sheet to Google sheets and having a problem with the links to folders as can not get them to work. Tried to use this format:
=HYPERLINK("Folder/sub Folder","link label")
Is there a way to get the folders to open or is it just not possible because Google sheets is web based and the security permissions won't allow it to open a windows folder?
The HYPERLINK() function of Google Sheets requires as first parameter a URL.
If you want to include a link to a Google Drive folder you should use the URL of that folder. The sharing URl of a folder looks like the following one
https://drive.google.com/folderview?id=1B5xqUTMMK_n6NmdkTUhsbUd9SE0&usp=sharing
The URL of a folder taken from the Google Drive UI looks like the following one
https://drive.google.com/drive/u/0/folders/1B5xqUTMMK_n6NmdkTUhsbUd9SE0
Note: I changed some characters of the real folder ID to prevent access requests.

Convert automatically Google Sheets docs to .txt tabular text file

I want to import Google-SpreadSheet data to lotus notes but not do no support the import from .gsheet filo so i want to automatically convert .gsheet doc to .txt file and after that import it using LotusNotes Script to create a doc with informations contained in that doc.
I must have to start form a .gsheet file.
Which are my options?
Can i use windows scipt ?
The first step is, to get the csv from the spreadsheet. Accoring to responses to this post in stackoverflow this is simply a matter of using the right url.
As soon as you have the url you can use LotusScript- Functions to call that URL and import the csv- data to your documents / database.
Just google for the right starting point (e.g. "lotusscript read web site") and come back if you have concrete questions in your created script.

Resources