How to Optimize Excel Documents for Paged Output?

Table of Contents
  1. Page Break Preview
  2. Changing Paper Size and Switch to Landscape
  3. Scaling Options
  4. Adjust Margins
  5. Optimize Row Height and Column Widths
  6. Hide or Print Gridlines
  7. Print Titles
  8. Headers and Footers
  9. Print Preview

Excel, popular for displaying data and figures, often presents a challenge when it comes to printing. Excel files aren't inherently optimized for print or paged output. Consequently, users frequently encounter frustrations when attempting to print their spreadsheets, with content spanning multiple pages, disrupting the intended flow.

However, there exist strategic solutions to rectify this issue. By employing techniques such as scaling, adjusting page sizes, and utilizing features like print titles, users can effectively ensure that their data is presented cohesively on the printed page, maintaining its integrity and readability. In this article, we'll explore these methods in detail, empowering users to harness Excel's printing functionalities with precision and efficiency.

Using Excel's Settings will ensure your excel data is properly formatted for Print, PDF export or PDF Conversion using Office Server Document Converter.



Logo for Office Server Document ConverterOffice Server Document Converter

A tool that converts Office documents to PDF

and Images file on the Server side


Page Break Preview

View: Excel's Page Break Preview allows you to see how your sheet will look when printed and make adjustments accordingly. 

Screenshot 2024-02-14 115330
-You can switch to Page Break Preview under the "View" tab.


Changing Paper Size and Switch to Landscape

Adjust the paper size and orientation to optimize the layout for printing, considering options such as switching to landscape mode.



-A1, A2, and A3 may not be available in in Microsoft Excel, but they are available as outputs for OSDC using the "-xlspaper" parameter.

Options for Page size, orientation, and scaling can be specified in your OSDC converted outputs without using Excel. Manual changes to your XLS or XLSX files using Excel will be reflected in OSDC's outputs. 

Example: -xlspaper A2,graph:landscape,100%


Scaling Options

 Excel offers options to scale your sheet to fit on a certain number of pages. You can access this feature under the "Page Layout" tab > "Scale to Fit" > "Width" or "Height". Experiment with different scaling percentages to see what works best for your sheet.  

Screenshot 2024-02-14 153218a

Scale options can also be set using OSDC's settings.
  • Scale : Specify the scaling ratio.
    • Specify % or number of pages in tall and wide direction.
    • If you use % specification, add % after the numerical character. e.g. 100%, 50%, 200%
    • If you use the number of pages for tall and wide direction, the entire sheet will be scaled to fit into the specified number of pages.
    • Number of pages can be specified by page:HORIZONTAL:VERTICAL. Specify number of pages in tall and wide direction. If 0 is specified for the one, the other one that is not 0 will be a base for determining the scaling ratio.
    • The default is 100%.
    • The minimum reduction ratio is 10%. The minimum value can be limited to prevent it from becoming too small. The default minimum value limit is 10%, and the value can be set from 10% to 100%. The value is specified by limit:SCALELIMIT, where SCALELIMIT is written in %. e.g. limit:10%, limit:60%, limit:100%



Adjust Margins

Narrowing the margins can help fit more content onto a single page. You can adjust margins under the "Page Layout" tab in Excel. Magin options can be set manually in Excel simply by clicking on the "Margins" icon under Page Layout.

Screenshot 2024-02-14 153218c

Additionally, Margin options can be set programmatically with OSDC: 

  • Margin : Specify the top/bottom right/left margins of a paper.
    • Using margin, any size of the top/bottom right/left margins (MARGINLEFT,MARGINTOP,MARGINRIGHT,MARGINBOTTOM) can be specified.
    • Add the unit of mm or inch after the numeric characters. If the unit is omitted, it is considered mm. It's necessary to specify all 4 numeric values. If not, an error will occur.
    • The default is margin:20mm:25mm:20mm:25mm.


Optimize Line Height Column Widths

Adjusting the Width and Height in your sheet is a necessary step to ensure that data is visible. If a cell is too small the data will be cut off, Excel does not automatically adjust to fit your data. Highlighting an entire row or column and right-clicking will allow you to adjust Column Width or Row Height. Or, with a more hands on approach, users can simply click and drag to adjust height and widths.

Row Hight and Column Width can also be set conditionally to fit within a set number of pages under the Page Layout tab.

Screenshot 2024-02-14 153218f

OSDC also has a parameter for adjusting the Row Height and Column Width programmatically.

The "-xlsrowcolcontrol" parameter specifies the value to adjust the line height and column width by the % value. Comma-delimited numbers with % can be specified in order of the line height and the column width. 

Example : line height 105.5% column width 95%
-xlsrowcolcontrol "105.5%,95%"


Hide or Print Gridlines

Gridlines are hidden by default, although hiding gridlines can make your sheet look cleaner when printed, they may help large sheets of figures more legible. You can hide or unhide gridlines under the "View" tab by unchecking the "Gridlines" View & Print options. For lines data sheets with many figures, gridlines might be easier to read. Try with and without to check which is suitable. Additionally, checking print Heading will output Row numbers and Column letters. 

Screenshot 2024-02-14 153218g

OSDC currently does not have a parameter to specify these settings. Excels default output is to not print gridlines, so if you would like your OSDC outputs to show Gridlines this option should be checked and saved for the Excel file. 


Print Titles


Screenshot 2024-02-14 153218b

If your sheet spans multiple pages horizontally or vertically, you might want to specify rows or columns as print titles. This ensures that these rows or columns are repeated on each printed page, providing context for the data. You can set print titles under the "Page Layout" tab > "Print Titles".

Screenshot 2024-02-14 115944-1
Some rows, such as the first row, can be set to repeat in your output with the Print Titles option.

OSDC does not currently support changing these settings programmatically, so if you would like your titles repeated on each output page, this option should be set in Excel.

Headers and Footers

Screenshot 2024-02-14 153218e

Adding headers and footers can provide additional context or information when printing your sheet. You can customize headers and footers under the "Page Layout" tab > "Headers & Footers".

Screenshot 2024-02-14 121702
Custom headers and footers added to your pages in Excel will be output by OSDC, but images inserted into the header or footer will be disregarded. Currently, OSDC does not have a parameter to insert headers or footers into Excel files, so if you would like your output to include headers and footers, this must be set in Excel.


Print Preview

Finally, use print preview to review the overall appearance of your document before printing, exporting or converting to PDF.