Tips & Tricks

How to Export Selected Rows From Excel as a PDF

Exporting only selected rows from an Excel to PDF spreadsheet is a common need for people who work with large data sets but only want to share a filtered subset. Maybe you have a master inventory list of 5,000 items but the recipient only needs to see rows 47 through 89. Or your budget spreadsheet contains sensitive salary rows that must be excluded before sharing the file externally. Excel provides several ways to export a specific row range to PDF, from the simple Set Print Area command to more flexible options using page break preview and VBA macros.

The method you pick depends on how frequently you perform this task. For one-off exports, the built-in Print Area tool is the fastest path. For daily or weekly reports where the row range changes each time, a slightly more advanced approach using named ranges or macros saves repeated manual setup. All methods described here work in Excel for Microsoft 365, Excel 2021, and Excel 2019 on Windows and Mac with minor menu differences.

If you regularly export filtered data to PDF, WukongPDF's PDF Export tools provide a browser-based alternative that accepts CSV and Excel uploads. After uploading your file, you can select specific rows and columns visually before generating the PDF output, which is faster than adjusting print settings in a desktop spreadsheet application each time.

How to Export Selected Rows From Excel as a PDF

Method 1: Set Print Area for Selected Rows

Most Set Print Area command tells Excel to print or export only the cells you have highlighted, ignoring everything else on the sheet. Select the rows you want to export by clicking and dragging across their row numbers on the left side of the Excel window. Hold Ctrl to select non-adjacent rows if the rows you need are not contiguous. With the rows selected, go to the Page Layout tab, click Print Area, and choose Set Print Area. Excel draws a subtle dashed border around the area that will be included in the output.

After setting the print area, go to File, then Export, and select Create PDF/XPS Document. In the export dialog, click Options to confirm that only the Active Sheet is selected and that the print area is respected. Click OK, then Publish. The resulting PDF contains only the rows within the defined print area, in the order they appear on the sheet.

To export multiple non-adjacent row ranges in one PDF, set the print area for each range individually, export to PDF, then merge the resulting files. Or use the Camera tool in Excel to create linked images of each range on a separate sheet and export that sheet. Print Area is a blunt but reliable tool for straightforward one-and-done exports.

WukongPDF

Try Excel to PDF

No installation needed. Works directly in your browser.

Get Started โ†’

Method 2: Hide Unwanted Rows Before Exporting

For quick ad-hoc exports, hiding rows is faster than adjusting print area settings. Select the rows you do not want to include, right-click the row headers, and choose Hide. The hidden rows disappear from view and are excluded when Excel prints or exports the sheet to PDF. After exporting, select the surrounding rows, right-click, and choose Unhide to restore the full spreadsheet.

This method works best when you need to exclude a small number of rows from an otherwise complete sheet. If you are hiding 80% of the rows and only keeping a few visible, the print area approach is cleaner because it does not leave your spreadsheet in an altered state. Hidden rows can also be accidentally unhidden by a colleague who does not know the sheet structure, which makes the print area method more predictable for shared workbooks.

Method 3: Use Filter to Export Visible Rows Only

When your data is formatted as an Excel Table or has AutoFilter enabled, you can filter to show only the rows that match specific criteria and export the filtered view directly to PDF. Apply a filter by clicking the dropdown arrows in the header row and selecting the values or conditions you want. Excel hides rows that do not match, showing only the filtered subset. Go to File, Export, Create PDF. Under Options, ensure that the Active Sheet is selected. Excel exports only the visible rows.

Filter-based export is useful for dynamic reporting scenarios. For example, if your sales data table has a Region column, you can filter to East, export the PDF for the East team, switch the filter to West, and export again. The export respects the current filter state without requiring you to redefine the print area each time. Just confirm after each export that the PDF contains the expected number of rows by checking the page count against the visible row count in Excel.

Method 4: Copy Selected Rows to a New Sheet

When you need to rearrange columns or add a title row before exporting, copying selected rows to a fresh sheet gives you the most control over the final PDF layout.

In practice, the tradeoff is that the copy is static. If the source data changes, you must repeat the copy-and-paste process. For recurring reports where the row range changes, this method becomes tedious. However, for a polished, presentation-ready PDF export where formatting matters as much as data accuracy, a dedicated export sheet produces the most professional output. Use Paste Special, Values to strip formulas and avoid broken references in the exported file.

Choosing the Right Method for Your Workflow

MethodStepsBest For
Print AreaSet print area, then File, Export, PDFSimple ranges, single-sheet exports
Page Break PreviewAdjust page breaks visually, then exportMulti-page exports with controlled layout
VBA MacroWrite macro to loop rows, export selectionRepeated exports with dynamic row counts

In day-to-day PDF work, when most users, the Print Area method handles 90 percent of selective row export needs with minimal setup. Combining Print Area with a filter gives you both row selection and dynamic filtering in one workflow. If you find yourself doing the same export every week, invest 20 minutes in recording a simple macro that selects the target rows, sets the print area, and triggers the PDF export with one keyboard shortcut. The time saved over a year more than justifies the upfront effort.

Exporting Selected Rows From Multi-Sheet Workbooks

When your workbook contains multiple sheets and you only want to export selected rows from one sheet while including data from others, you need a slightly different approach. Each sheet has its own independent print area setting. Set the print area on Sheet1 to include only the target rows. On Sheet2, set a different print area or leave it covering all data. Then, in the PDF export dialog, select the Entire Workbook option instead of Active Sheet. Excel respects each sheet's individual print area when generating the combined PDF.

A practical example: a monthly financial report workbook with four sheets named Summary, Revenue, Expenses, and Notes. You want to export only rows 5 through 15 from Revenue, rows 3 through 20 from Expenses, and all of Summary and Notes. Set the print area on each sheet to the desired row range. Leave Summary and Notes as their full data ranges. The exported PDF contains all four sheets, each cropped to the specified rows. This technique is useful for board reports where each department head provides a data sheet but the final package should omit sensitive rows like individual salary lines or internal commentary.

For workbooks with dozens of sheets, manually setting print area on each one is time-consuming. Hold Ctrl and click multiple sheet tabs to group them. Set the print area once, and Excel applies it to all grouped sheets simultaneously. Ungroup the sheets after setting the print area by right-clicking any tab and choosing Ungroup Sheets. Then individually adjust any sheets that need a different print area than the group default.

The ability to export specific rows to PDF without altering the source spreadsheet keeps your data secure and your workflow fast. Whether you use Print Area for one-off exports, filters for dynamic row selection, or macros for weekly reports, the right technique saves you from manually deleting rows before each export and hoping you remember to undo the changes afterward.

Using Named Ranges for Recurring Row Exports

If the same row range gets exported week after week, define a named range instead of resetting the print area each time. Select the target rows, click in the Name Box left of the formula bar, type a descriptive name like WeeklyReportRows, and press Enter. Then, instead of manually selecting rows before each export, go to the Name Box dropdown, select WeeklyReportRows, and the range is instantly highlighted. Set the print area to the named range via Page Layout, Print Area, Set Print Area. The named range persists across sessions, so next week you simply select it from the dropdown and export without repeating the selection step.

Named ranges can also be dynamic. If your data rows grow each week as new transactions are added, use an OFFSET formula to define a named range that automatically expands. For example, define a named range with the formula =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),5) to include all non-empty rows in columns A through E. Each week's export automatically captures the latest data without adjusting the range manually. This approach turns a repetitive manual export task into a one-click operation that is also less error-prone.

WukongPDF

Try Excel to PDF

No installation needed. Works directly in your browser.

Get Started โ†’