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

后端 未结 7 1390
[愿得一人]
[愿得一人] 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条回答
  •  萌比男神i
    2020-12-15 15:13

    @rcknr, worked for me, more options below. (From: http://productforums.google.com/forum/#!msg/apps-script/wQvCF6yY1Qk/R0uyVmf-Xx0J )

    URL like this: https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=tOHm3f8tdIxf7tSZzWvBGiA&gid=0&size=legal&fitw=true&gridlines=false&portrait=false&exportFormat=pdf

    other settings

    fmcmd=12
    size=legal/A4
    fzr=true/false
    portrait=false/true
    fitw=true/false
    gid=0/1/2  
    gridlines=false/true
    printtitle=false/true
    sheetnames=false/true
    pagenum=UNDEFINED
    attachment=false/true  
    

    true/false where sometimes required, I could not use 0/1 instead.

提交回复
热议问题