Apps Script

Hi,

I need your help.
This script below is for export purpose to PDF format but only one sheet.
How to make it multiple sheet?
I believe it related to “gid” but i’m not sure the format.

Summary

const exportOptions =

'exportFormat=pdf&format=pdf' + // export as pdf

'&size=A4' + // paper size letter / You can use A4 or legal

'&portrait=true' + // orientation portal, use false for landscape

'&fitw=true' + // fit to page width false, to get the actual size

'&sheetnames=false&printtitle=false' + // hide optional headers and footers

'&pagenumbers=false&gridlines=false' + // hide page numbers and gridlines

'&fzr=true' + // do not repeat row headers (frozen rows) on each page

'&gid=101637384'; // the sheet's Id. Change it to your sheet ID.
1 Like

See if this can help you:

Or mine tutorial to create a PDF document using external services: