Reputation: 23
Is there a way via a hyperlink to only create a PDF of a specific sheet using a hyperlink formula? If I do not hide the sheet it will also add the second sheet to the pdf export. I tried using GID in the URL, but that only reopened the current PDF or exported it as CSV. This is created dynamically via script when the sheet opens.
Upvotes: 0
Views: 381
Reputation: 17613
Try this:
Let's say you want to publish only Sheet 1 as PDF of your spreadsheet file:
Notice also the URI format:
https://docs.google.com/spreadsheets/d/e/2PACX-1vS-fqXA_S5rj18aVSe6bj1HA2AUYCaYr2BNLbN_w1a_B77QlgnRKB5y3QUBTv0wIu6KxkOm_qq71m6H/pub?gid=0&single=true&output=pdf
If you want to publish a different sheet as PDF, copy the 'gid' of that sheet and assign it to the 'gid' value in the link.
Upvotes: 1