-1

I need a script to, adding a print button in a sheet1, to print the entire sheet2.

How can I do this?

Many thanks

1
  • Welcome. Please add a brief description of your search/research efforts as is suggested in How to Ask.
    – Rubén
    Dec 16, 2019 at 15:25

1 Answer 1

0

You can't really set up the print screen that way in google sheets right now but you can create a link to produce a pdf file of the sheet:

=hyperlink("docs.google.com/spreadsheets/d/"
      & "!!!WORKBOOK ID GOES HERE!!!"
      & "/export?exportFormat=pdf&format=pdf"
      & "&size=LETTER"
      & "&portrait=true"
      & "&fitw=true"       
      & "&top_margin=0.50"              
      & "&bottom_margin=0.50"          
      & "&left_margin=0.50"             
      & "&right_margin=0.50"           
      & "&sheetnames=false&printtitle=false"
      & "&pagenum=false"
      & "&gridlines=false"
      & "&fzr=FALSE"      
      & "&gid="
      & "!!!SHEET2 GID HERE!!!","pdf of sheet2")

Feel free to edit the settings of the pdf output url to how you want it to look printed.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.