We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

XLSX whole sheet to PDF page convertion


we’ve been using groupdocs viewer for some time and I have a question,
is there any way to convert an xlsx file or another containing sheets to PDF
in such a way that the whole sheet fits on the pdf page.
Of course, the start view may be blurry, but when you zoom in properly on the page, you will see individual cells and elements.

I know there is such an option in converting to html, but is it possible to convert to pdf like this?
Maybe you have a workaround or plan to do this feature?


Sure, you can render a worksheet to a single page using the following code

using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;

namespace ViewerSampleApp
    static class Program
        static void Main()
            using (Viewer viewer = new Viewer("sample.xlsx"))
                PdfViewOptions viewOptions = new PdfViewOptions();
                viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet();

Optionally, you can skip rendering of empty columns and empty rows

viewOptions.SpreadsheetOptions.SkipEmptyColumns = true;
viewOptions.SpreadsheetOptions.SkipEmptyRows = true;

Looking forward for your feedback.

1 Like

Thank you for your help :smile:
Somehow I missed it.


You’re welcome!

Have a nice day!