Is there a way to create a pdf with google apps script that includes only a specific sheet of a spreadsheet?

后端 未结 7 1382
[愿得一人]
[愿得一人] 2020-12-15 14:43

In the spreadsheet app itself, you have the options to print only a specific sheet. You also can turn off the grid lines when creating the pdf from within the app. Is ther

相关标签:
7条回答
  • 2020-12-15 15:23

    Take a look at this code snippet: https://gist.github.com/4169590

    What it does is uses Google Spreadsheet built-in download as PDF functionality so the same sort of customization is possible, including hiding gridlines and specifying a worksheet. Play with GET parameters to get the desirable output. In the end, script converts PDF file to a blob which you can manipulate further in your own script. To get this running though you'll need an additional authorization for Spreadsheet feeds scope.

    Hope it helps.

    0 讨论(0)
提交回复
热议问题