In Google App Script, I am using the getAs('application/pdf')
method on my spreadsheet file to export it as a PDF. When I do this, the entire spreadsheet is exported, however I would like some more control over what is exported. Essentially I’d like to mirror what is possible when you click File -> Download -> PDF
. For example I only want specific sheets to be included, I want to ensure the orientation is portrait, I want certain header and footer options to be selected, and so on.
I can’t find any documentation outlining possible parameters for getAs
, is this feature possible through a script?