Google Sheets: Script to Print As PDF, Save as CSV, XLSX
Hyperlinks can do more than just link documents and sheet pages. They can also help you to quickly download the content as a CSV, TSV, XLSX or PDF. Best of all, we can limit the range to be downloaded. Problem: If using a Google Sheet, exporting specific ranges as a PDF, CSV, etc., is difficult or impossible using Google's preselected menu bar. Solution & Skills: We will create one Google Spreadsheet where we utilize the hyperlink function to create download links. This solution helps with the creation of invoices, grabbing CSV data that can then be uploaded to other programs/web applications. Skills: ✔ Write hyperlink function; ✔ Link to pages within spreadsheet; ✔ Modify link to create CSV, XLSX or PDF files by range. Hyperlink Function: Here's the breakdown of the hyperlink function in Google Sheet: = hyperlink ( "https://www.google.com" , "Google" ) The equal sign tells Google Spreadsheets that we are using the hyperlink function. Inside the firs