How to Fix Extra Space and Page Breaks in SharePoint Excel File Viewer
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.

- 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.
Ensure you have editing permissions for the SharePoint page and access to the original Excel file stored in your SharePoint document library.
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.
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.
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.
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.
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.

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. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheet and seamlessly open your existing Microsoft Excel (.xlsx) files without losing formatting.
- 3. Edit and Format Data: Use the familiar, intuitive interface to easily adjust your data ranges and layouts.

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.




