0

Using Google Sheets and working on a script to make exporting (downloading) a PDF copy of a single sheet much easier. The end goal is to emulate the Download as... PDF, but click of a button and it's done, without having to go to the menu. Also uses a custom file name (which includes the date and time).

The question...

When exporting a sheet using a script, is there a way to customize the content of the headers? I know when doing it manually, I can customize what appears in the headers and footers, but what about a script to change the top (or bottom) left/center/right areas when exporting a PDF via script? I know I can optionally enable a title (printtitle=true) or sheet name (sheetnames=true), but I can't find anything to permit me to customize what appears.

What I would like is to have a custom name/string for the top left and top center, then the date and time in the top right.

TheMaster
  • 45,448
  • 6
  • 62
  • 85
Wolfie
  • 95
  • 1
  • 6
  • 1
    Unfortunately, in the current stage, it seems that there are no methods for setting the custom headers and footers when the Spreadsheet is exported as a PDF file. Also at this thread, the same situation has already been asked. But no answers are posted yet. https://stackoverflow.com/q/50025746/7108653 – Tanaike May 21 '19 at 23:43
  • 1
    That is unfortunate to hear, but at least I now know that my attempts to find the solution on my own weren't from a lack of proper searches. Thank you for the response and information. – Wolfie May 22 '19 at 10:08

0 Answers0