SharePoint Document Issues

How to Fix Extra Space and Page Breaks in SharePoint Excel File Viewer

Bushra ParveenBushra Parveen Nov 2, 2026 868 views

Question details

The user needs to remove large empty areas and unwanted page-break lines that appear when displaying a specific Excel range in SharePoint.

How to Fix Extra Space and Page Breaks in SharePoint Excel File Viewer
Product
Microsoft SharePoint / Excel
Device & OS
not provided
Scenario
Displaying a specific Excel file range on a SharePoint site page.
Observed behavior
The SharePoint File Viewer web part shows excessive white space and visible page-break lines instead of neatly cropping to the selected Excel data range.
Before you start

Ensure you have editing permissions for the SharePoint page and access to the original Excel file stored in your SharePoint document library.

Solution 1Recommended

Use the Embed Web Part with Custom Dimensions

By replacing the standard File Viewer with an Embed web part, you can manually control the height and width to eliminate extra space.

The default File Viewer web part lacks precise cropping controls for spreadsheets. Using an iframe embed code allows you to define exact pixel dimensions, effectively hiding unwanted whitespace and page break lines from your SharePoint page.

1
Generate Excel Embed Code

Open your Excel file in SharePoint Online (Excel for the Web). Go to 'File' > 'Share' > 'Embed'. Select the specific range or table you want to show, and copy the generated iframe code.

2
Remove File Viewer

Navigate to your SharePoint site page, click 'Edit' at the top right, and delete the existing File Viewer web part that is displaying the extra space.

3
Add Embed Web Part

Click the '+' icon to add a new web part and select 'Embed'. Paste your copied iframe code into the website address or embed code box.

4
Adjust Dimensions

Modify the 'width' and 'height' pixel values directly within the pasted iframe code until the extra space and page breaks are no longer visible. Click 'Republish' to save changes.

Use the Embed Web Part with Custom Dimensions
Send Feedback to Microsoft: Since native range display controls are currently limited, you can submit feedback to Microsoft requesting improved cropping features for the standard File Viewer web part.
Free Microsoft Office alternative

Create and View Spreadsheets Flawlessly with WPS Office

If you frequently encounter layout limitations and viewing glitches with Microsoft Office web tools, consider switching to WPS Office. It provides a lightweight, highly compatible spreadsheet editor that makes managing your data simple and cost-effective.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheet and seamlessly open your existing Microsoft Excel (.xlsx) files without losing formatting.
  3. 3. Edit and Format Data: Use the familiar, intuitive interface to easily adjust your data ranges and layouts.
Fully compatible with Microsoft Excel formats (.xlsx, .xls)Clean and intuitive interface without bloated viewing glitchesFree and lightweight alternative to Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why does the SharePoint File Viewer add extra space to Excel ranges?

The File Viewer web part uses default dimension settings that do not automatically crop to your specific Excel data range, often resulting in empty padding and visible page breaks.

Can I disable page breaks in the SharePoint File Viewer?

Currently, SharePoint does not offer a built-in toggle to hide page breaks within the File Viewer web part. Using the Embed web part with a specified viewing range is the best workaround.

How do I find the correct embed code for my Excel file?

Open your Excel workbook in Excel for the Web, go to File > Share > Embed. You can select the specific range or table you want to display and instantly copy the generated iframe code to use in SharePoint.