How to Set Excel PDF Export to Letter Size and Landscape Orientation
Question details
The user needs to export Excel worksheets as PDF files specifically in Letter size and Landscape orientation, but the current output generates an excessively large paper size.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Automating or configuring the PDF export of an Excel worksheet to ensure the layout matches standard printable dimensions.
- Observed behavior
- Excel worksheets are being exported as PDF files with a massive custom paper size of approximately 17.35 by 22.45 inches instead of the required Letter size in Landscape orientation.
Before exporting your workbook, ensure that your default printer supports Letter size, and verify if a VBA macro is currently dictating your export settings.
Update VBA Page Setup Properties for PDF Export
Adjust the PageSetup properties in your Excel VBA macro to explicitly enforce Letter size and Landscape orientation before triggering the export.
When using VBA to export a PDF, Excel relies on the worksheet's PageSetup properties. If these are not explicitly defined, the PDF might inherit custom or unexpected dimensions.
Open your Excel workbook and press ALT + F11 to access the Visual Basic for Applications (VBA) editor.
Find the module containing the code that handles your PDF export.
Within the With ActiveSheet.PageSetup block (or equivalent), ensure you include the property .PaperSize = xlPaperLetter to force the document into Letter dimensions.
Locate the orientation setting in the code. Change .Orientation = xlPortrait to .Orientation = xlLandscape.
Save your code and run the macro to generate the PDF with the corrected Letter and Landscape formatting.

Configure Page Layout Manually Before Exporting
If you are not using VBA, you can configure the Page Layout settings directly in the Excel ribbon before saving the file as a PDF.
Export to PDF Perfectly with WPS Spreadsheet
WPS Office offers a built-in, highly reliable PDF export feature that respects your exact page layout settings without requiring complex VBA code adjustments.
- 1. Open Your File in WPS: Launch WPS Office and open your spreadsheet file.
- 2. Adjust Page Layout: Navigate to the 'Page Layout' tab. Set 'Orientation' to Landscape and 'Size' to Letter.
- 3. Access PDF Export: Click the 'Menu' button in the top left corner, navigate to 'Export to PDF', and click it.
- 4. Confirm and Export: Review the settings in the dialog box to ensure they match your layout, then click 'Export' to save your file.

Frequently Asked Questions
Why is my Excel PDF exporting in a huge custom size?
This usually happens if the print area is undefined or if the default printer driver dictates a custom scalable paper size. Setting explicit page setups (like Letter) before exporting overrides this behavior.
Does .Orientation = xlLandscape work in all versions of Excel?
Yes, the xlLandscape enumeration is a standard VBA property in Excel and works across all modern versions of Microsoft Excel and compatible macro-enabled spreadsheet programs.
How do I fit all my columns on one page in the PDF?
Under the Page Layout tab, click 'Page Setup' (the small arrow in the corner), go to the 'Page' tab, and select 'Fit to 1 page wide by 1 page tall' before exporting to PDF. In VBA, use .Zoom = False and .FitToPagesWide = 1.
Can I export only a specific range to PDF in landscape?
Yes. Select the specific cells you want to export, go to Page Layout > Print Area > Set Print Area. Ensure your orientation is set to Landscape, and when exporting, the PDF will only include that specific range.




