How can I skip printing of one or several sheets printing to pdf ?

Posted by: wilfried-fp on 8 September 2017, 3:01 pm EST

  • Posted 8 September 2017, 3:01 pm EST

    I have to print the whole spreadsheet to a pdf using fpSpread.PrintSheet(-1). But one of the sheetviews is invisible and shall not be printed. It always prints also the invisible sheet.

    I tried to set the printinfo for this sheet to nothing, but it then the invisible sheet is printed to a PRINTER !
    Even if I specify a printers name which does not exist ("xxx") it prints the sheet to the default printer.

    I alread posted the question in dec. 2012. But then I didn't need the feature any more. Manpreet Kaur sent me  an example (, I tried this now and it does the SAME thing as my project:
    Sheet 1,2 and 4are properly printed to pdf, the invisible sheet2 is printed to the PRINTER !!!

    It's really urgent now !

    I cannot upload the example, because the InternetExplorer crashes when I try to attach a file !

    Thanks, Wilfried

  • Replied 8 September 2017, 3:01 pm EST

    I now found a workaround:

    <FONT size=2>

    <FONT size=2>FpDossier.PrintSheet(-1)
    </FONT></FONT><FONT size=2>FpDossier.Sheets.Add(FpDossier_Sheet3)

    </FONT>It seems so that the sheetObject still remains existing after removing from the sheets collection and can be added later again. I hope this is consistent !


  • Replied 8 September 2017, 3:01 pm EST


    I was not able to replicate the issue at my end, I created a Spread with three sheets and set the visibility of one sheet to false to make it invisible. Later on printing all the sheets to pdf the inivisible sheet was not printed to pdf. Please have a look at the attached sample that depicts the same and the pdf file generated. I would request you to modify the same to depict your issue.


    Manpreet Kaur

  • Replied 8 September 2017, 3:01 pm EST

    I did try the example you gave me earlier this year. It does not print the invisible sheet to pdf, thats rigth,  BUT IT PRINTS THE SHEET TO THE Default-PRINTER !!!!


  • Replied 8 September 2017, 3:01 pm EST


    Unfortunately, I am not able to replicate the issue at my end, the invisible sheets are not getting printed at all. I tested the issue with the sample attached above. They are neither printed to the pdf file nor to the default printer. It would be helpful if you could provide me with any additional information to narrow down the issue further, what is the system configuration on which you are able to reproduce this issue, which printer are you currently using.


    Manpreet Kaur

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels