Calc Guide
Chapter
6
Printing, Exporting, and E mailing
This document is Copyright © 2005–2011 by its contributors as listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.
All trademarks within this guide belong to their legitimate owners.
Contributors
Barbara Duprey
Feedback
Please direct any comments or suggestions about this document to: documentation@libreoffice.org
Acknowledgments
This chapter is based on Chapter 6 of the OpenOffice.org 3.3 Calc Guide. The contributors to that chapter are:
Jean
Hollis Weber Emma Kirsopp Peter Kupfer
Shelagh Manton Kashmira
Patel Linda Worthington
Publication date and software version
Published 15 April 2011. Based on LibreOffice 3.3.
Some keystrokes and menu items are different on a Mac from those used in Windows and Linux. The table below gives some common substitutions for the instructions in this chapter. For a more detailed list, see the application Help.
Windows/Linux |
Mac equivalent |
Effect |
Tools → Options menu selection |
LibreOffice → Preferences |
Access setup options |
Right-click |
Control+click |
Open context menu |
Ctrl (Control) |
z (Command) |
Used with other keys |
F5 |
Shift+z+F5 |
Open the Navigator |
F11 |
z+T |
Open Styles & Formatting window |
Contents
Selecting general printing options 5
Printing multiple pages on a single sheet of paper 5
Printing rows or columns on every page 8
Defining a custom print range 9
Printing options setup in page styles 11
Setting a header or a footer 12
Header or footer appearance 13
Setting the contents of the header or footer 14
Controlling PDF content and quality 15
General page of PDF Options dialog 15
Initial View page of PDF Options dialog 17
User Interface page of PDF Options dialog 17
Links page of PDF Options dialog 18
Security page of PDF Options dialog 19
E-mailing a spreadsheet to several recipients 21
Click the Print File Directly icon to send the entire document to the default printer defined for your computer.
Note |
You can change the action of the Print File Directly icon to send the document to the printer defined for the document instead of the default printer for the computer. Choose Tools → Options → Load/Save → General and select the Load printer settings with the document option. |
For more control over printing, use the Print dialog (File → Print or Ctrl+P).
The Print dialog has four tabs, from which you can choose a range of options, as described in the following sections.
Note |
The options selected on the Print dialog apply to this printing of this document only. To specify default printing settings for LibreOffice, go to Tools → Options → LibreOffice – Print and Tools → Options → LibreOffice Calc – Print. See Chapter 14, Setting Up and Customizing Calc, for details. |
Selecting general printing options
On the General tab of the Print dialog (Figure 1), you can choose:
The printer (from the printers available)
Which sheets and pages to print, the number of copies to print, and whether to collate multiple copies (Range and copies section)
Select the Properties button to display a dialog where you can choose portrait or landscape orientation, which paper tray to use, and the paper size to print on.
On the Options tab of the Print dialog (Figure 2), you can choose to print to a file (instead of to a printer), to create a single print job containing several copies of the document (instead of a separate print job for each copy), and whether to print in reverse page order.
Printing multiple pages on a single sheet of paper
You can print multiple pages of a document on one sheet of paper. To do this:
In the Print dialog, select the Page Layout tab (Figure 3).
In the Layout section, select from the drop-down list the number of pages to print per sheet. The preview panel on the left of the Print dialog shows how the printed document will look.
When printing more than 2 pages per sheet, you can choose the order in which they are printing across and down the paper. The pictures above and below show the difference.
In the Page sides section, select whether to print all pages or only some pages.
Click the Print button.
In addition to printing a full document, you can choose to print individual sheets, ranges of sheets, or a selection of a document.
You can choose single sheets, multiple sheets, and selections of cells for printing.
Printing an individual sheet:
In the spreadsheet, click on the sheet tab to select the sheet you want to print.
Choose File → Print from the menu bar.
In the Ranges and copies section of the Print dialog, choose the Selected sheets option.
Click the Print button.
Printing a range of sheets:
In the spreadsheet, select the sheets to print.
Select the first sheet.
Hold down the Control key.
Click on the additional sheet tabs.
Release the Control key when all required sheets are selected.
Choose File → Print from the menu bar.
In the Ranges and copies section of the Print dialog, choose the Selected sheets option.
Click the Print button.
Printing a selection of cells:
In the document, select the section of cells to print.
Choose File → Print from the menu.
In the Ranges and copies section of the Print dialog, select the Selected cells option.
Click the Print button.
Caution
|
After printing, be sure to deselect the extra sheets. If you keep them selected, the next time you enter data on one sheet, you enter data on all the selected sheets. This might not be what you want. |
Print ranges have several uses, including printing only a specific part of the data or printing selected rows or columns on every page.
To define a new print range or modify an existing print range:
Highlight the range of cells that comprise the print range.
Choose Format → Print Ranges → Define.
The page break lines display on the screen.
Tip |
You can check the print range by using File → Page Preview. LibreOffice will only display the cells in the print range. |
After defining a print range, you can add more cells to it. This allows multiple, separate areas of the same sheet to be printed, while not printing the whole sheet. After you have defined a print range:
Highlight the range of cells to be added to the print range.
Choose Format → Print Ranges → Add. This adds the extra cells to the print range.
The page break lines no longer display on the screen.
Note |
The additional print range will print as a separate page, even if both ranges are on the same sheet. |
It may become necessary to remove a defined print range, for example if the whole sheet needs to be printed later.
Choose Format → Print Ranges → Remove. This removes all defined print ranges on the sheet. After the print range is removed, the default page break lines will appear on the screen.
At any time, you can directly edit the print range, for example to remove or resize part of the print range. Choose Format → Print Ranges → Edit. If you have already selected a print range, the Edit Print Ranges dialog looks something like Figure 5.
In this example, three rectangles are selected, each separated by a semicolon. The first is bounded by cell A3 ($A$3) in the top left and cell C9 ($C$9) in the bottom right corners. Clicking anywhere in the text entry box shows the currently selected print range on the screen, with each rectangle in a different color, as in Figure 6.
After
making any changes, click the Shrink
icon next to the text entry box to redisplay the rectangles with
their new values.
To re-expand the Edit Print Ranges dialog, click the Shrink icon again.
Printing rows or columns on every page
If a sheet is printed on multiple pages, you can set up certain rows or columns to repeat on each printed page.
For example, if the top two rows of the sheet as well as column A need to be printed on all pages, do the following:
Choose Format → Print Ranges → Edit. On the Edit Print Ranges dialog, type the rows in the text entry box under Rows to repeat. For example, to repeat rows 1 and 2, type $1:$2. This automatically changes Rows to repeat from - none - to - user defined -.
To repeat columns, type the columns in the text entry box under Columns to repeat. For example, to repeat column A, type $A. This automatically changes Columns to repeat from - none - to - user defined -.
Click OK.
Note |
You do not need to select the entire range of the rows to be repeated; simply select one cell in each row. |
In addition to highlighting a print range for each print job, you can define a range of cells to be used repeatedly. This may be useful if there are different areas of a large spreadsheet that need to be printed for different reports. Several different print ranges can be defined to meet this need.
To define a print range, use the same procedure as labeling an area of the sheet. Highlight the cells you want to define as a print range and select Insert → Names → Define. (The cells can be highlighted after opening the Define Names dialog as well.)
On the Define Names dialog (Figure 8), type a name for the range in the text box with the blinking cursor. The name of the range cannot contain any spaces.
Click the More button in the dialog and then select the Print range option. Click the Add button.
To include more than one group of cells in the selection, type in the additional ranges. For example, to select the rectangle with A3 as the top left cell and F20 as the bottom right cell, enter ;$A$3:$F$20 or ;A3:F20 (both work and are equivalent) after the initial selection. Make sure that each group of cells is separated with a semicolon. Click OK.
To print this range:
Choose Format → Print Ranges → Edit (Figure 5). The previously defined area now appears in the drop-down box under Print range.
Select the defined print range and click OK.
This method can be useful to quickly change the print range without highlighting a large area of cells every time.
Note |
If the cell range name refers to more than one group of cells, it will not appear in the drop-down list. You will need to type it in or highlight and select it. |
While defining a print range can be a powerful tool, it may sometimes be necessary to manually adjust Calc’s printout. To do this, you can use a manual break. A manual break helps to ensure that your data prints properly. You can insert a horizontal page break above, or a vertical page break to the left of, the active cell.
To insert a page break:
Navigate to the cell where the page break will begin.
Select Insert → Manual Break.
Select Row Break or Column Break depending on your need.
The break is now set.
Selecting Row Break creates a page break above the selected cell. For example, if the active cell is H15, then the break is created between rows 14 and 15.
Selecting Column Break creates a page break to the left of the selected cell. For example, if the active cell is H15, then the break is created between columns G and H.
Tip |
To see page break lines more easily on screen, you can change their color. Choose Tools → Options → LibreOffice → Appearance and scroll down to the Spreadsheet section. |
To remove a page break:
Navigate to a cell that is next to the break you want to remove.
Select Edit → Delete Manual Break.
Select Row Break or Column Break depending on your need.
The break is now removed.
Note |
Multiple manual row and column breaks can exist on the same page. When you want to remove them, you have to remove each one individually. This may be confusing at times, because although there may be a column break set on the page, when you go to Edit → Manual Break, the Column break choice may not be available (grayed out). In order to remove the break, you have to be in the cell next to the break. For example, if you set the column break while you are in H15, you can not remove it if you are in cell D15. However, you can remove it from any cell in column H. |
Printing options setup in page styles
Several printing options are set in the page style for sheets. These include the page order, details, and scale to be printed, Because these options are set in the page style, different page styles can be set up to quickly change the print properties of the sheets in the spreadsheet. See Chapter 3, Using Styles and Templates in Calc, for more about page styles.
The Sheet tab of the Page Style dialog (Figure 9) provides the following options.
Page Order
You can set the order in which pages print. This is especially useful in a large document; for example, controlling the print order can save time if you have to collate the document a certain way.
Where a sheet prints to more than one page of paper, it can be printed either by column, where the first column of pages prints, and then the second column and so on, or by row as shown in the graphic on the top right of the dialog in Figure 9.
You can specify which details to print. These details include:
Row and column headers
Sheet grid—prints the borders of the cells as a grid
Comments—prints the comments defined in your spreadsheet on a separate page, along with the corresponding cell reference
Objects and graphics
Charts
Drawing objects
Formulas—prints the formulas contained in the cells, instead of the results
Zero Values—prints cells with a zero value
Scale
Use the scale features to control the number of pages the data will print on.
Reduce/Enlarge printout—scales the data in the printout either larger or smaller. For example, if a sheet would normally print out as four pages (two high and two wide), a scaling of 50% would print as one page (both width and height are halved).
Fit print range(s) on number of pages—defines exactly how many pages the printout will take up. This option will only reduce a printout, it will not enlarge it. To enlarge a printout, the reduce/enlarge option must be used.
Fit print range(s) to width/height—defines how high and wide the printout will be, in pages.
Headers and footers are predefined pieces of text that are printed at the top or bottom of a sheet outside of the sheet area. Headers are set the same way as footers.
Headers and footers are assigned to a page style. You can define more than one page style for a spreadsheet and assign different page styles to different sheets. For more about page styles, see Chapter 4.
To set a header or footer:
Navigate to the sheet that you want to set the header or footer for. Select Format → Page.
Select the Header (or Footer) tab.
Select the Header on option.
From here you can also set the margins, the spacing, and height for the header or footer. You can check the AutoFit height box to automatically adjust the height of the header or footer.
Margin
Changing the size of the left or right margin adjusts how far the header or footer is from that side of the page.
Spacing
Spacing affects how far above or below the sheet the header or footer will print. So, if spacing is set to 1.00", then there will be 1 inch between the header or footer and the sheet.
Height
Height affects how big the header or footer will be.
To change the appearance of the header or footer, click the More button in the dialog. This opens the Border/Background dialog.
From this dialog you can set the background and border style of the header or footer. See Chapter 4, Using Styles and Templates in Calc, for more information.
Setting the contents of the header or footer
The header or footer of a Calc spreadsheet has three columns for text. Each column can have different contents.
To set the contents of the header or footer, click the Edit button in the header or footer dialog shown in Figure 10 to display the dialog shown in Figure 12.
Areas
Each area in the header or footer is independent and can have different information in it.
Header
You can select from several preset choices in the Header drop-down list, or specify a custom header using the buttons below the area boxes. (To format a footer, the choices are the same.)
Custom header
Click in the area (Left, Center, Right) that you want to customize, then use the buttons to add elements or change text attributes.
Opens the Text Attributes dialog.
Inserts the total number of pages.
Inserts the File Name field.
Inserts the Date field.
Inserts the Sheet Name field.
Inserts the Time field.
Inserts the current page number.
Calc can export documents to PDF (Portable Document Format). This industry-standard file format is ideal for sending the file to someone else to view using Adobe Reader or other PDF viewers.
Click the Export Directly as PDF icon to export the entire document using your default PDF settings. You are asked to enter the file name and location for the PDF file, but you do not get a chance to choose a page range, the image compression, or other options.
Controlling PDF content and quality
For more control over the content and quality of the resulting PDF, use File → Export as PDF. The PDF Options dialog opens. This dialog has five pages (General, Initial View, User Interface, Links, and Security). Select the appropriate settings, and then click Export. Then you are asked to enter the location and file name of the PDF to be created, and click Save to export the file.
General page of PDF Options dialog
On the General page, you can choose which pages to include in the PDF, the type of compression to use for images (which affects the quality of images in the PDF), and other options.
Range section
All: Exports the entire document.
Pages: To export a range of pages, use the format 3-6 (pages 3 to 6). To export single pages, use the format 7;9;11 (pages 7, 9, and 11). You can also export a combination of page ranges and single pages, by using a format like 3-6;8;10;12.
Selection: Exports whatever content is selected.
Images section
Lossless compression: Images are stored without any loss of quality. Tends to make large files when used with photographs. Recommended for other kinds of images or graphics.
JPEG compression: Allows for varying degrees of quality. A setting of 90% works well with photographs (small file size, little perceptible loss).
Reduce image resolution: Lower-DPI (dots per inch) images have lower quality. For viewing on a computer screen a resolution of 72dpi (for Windows) or 96dpi (GNU/Linux) is sufficient, while for printing it is generally preferable to use at least 300 or 600 dpi, depending on the capability of the printer. Higher dpi settings greatly increase the size of the exported file.
Note |
EPS (Encapsulated PostScript) images with embedded previews are exported only as previews. EPS images without embedded previews are exported as empty placeholders. |
General section
PDF/A-1a: PDF/A is an ISO standard for long-term preservation of documents, by embedding all the information necessary for faithful reproduction (such as fonts) while forbidding other elements (including forms, security, and encryption). PDF tags are written. If you select PDF/A-1a, the forbidden elements are greyed-out (not available).
Tagged PDF: Tagged PDF contains information about the structure of the document’s contents. This can help to display the document on devices with different screens, and when using screen reader software. Some tags that are exported are table of contents, hyperlinks, and controls. This option can increase file sizes significantly.
Create PDF form - Submit format: Choose the format for submitting forms from within the PDF file. This setting overrides the control’s URL property that you set in the document. There is only one common setting valid for the whole PDF document: PDF (sends the whole document), FDF (sends the control contents), HTML, and XML. Most often you will choose the PDF format.
Export bookmarks: Exports sheet names in Calc documents as “bookmarks” (a table of contents list displayed by some PDF readers, including Adobe Reader).
Export comments: Exports comments in Calc documents as PDF notes. You may not want this!
Export automatically inserted blank pages: Not available in Calc.
Embed standard fonts: You can choose to embed the standard fonts (Times, Helvetica, Courier, Symbol, and ZapfDingbats) in all PDF documents created by LibreOffice, to enhance display accuracy in PDF viewers.
Initial View page of PDF Options dialog
On the Initial View page (Figure 14), you can choose how the PDF opens by default in a PDF viewer. The selections are self-explanatory.
User Interface page of PDF Options dialog
On the User Interface page (Figure 15), you can choose more settings to control how a PDF viewer displays the file. Some of these choices are particularly useful when you are creating a PDF to be used as a presentation or a kiosk-type display.
Window options section
Resize window to initial page: Causes the PDF viewer window to resize to fit the first page of the PDF.
Center window on screen: Causes the PDF viewer window to be centered on the computer screen.
Open in full screen mode: Causes the PDF viewer to open full-screen instead of in a smaller window.
Display document title: Causes the PDF viewer to display the document’s title in the title bar.
User interface options section
Hide menubar: Causes the PDF viewer to hide the menu bar.
Hide toolbar: Causes the PDF viewer to hide the toolbar.
Hide window controls: Causes the PDF viewer to hide other window controls.
Transitions
Not available in Calc.
Bookmarks
Select how many heading levels are displayed as bookmarks, if Export bookmarks is selected on the General page.
Links page of PDF Options dialog
On this page you can choose how links are exported to PDF.
Export bookmarks as named destinations
If you have defined Writer bookmarks, Impress or Draw slide names, or Calc sheet names, this option exports them as “named destinations” to which Web pages and PDF documents can link.
Convert document references to PDF targets
If you have defined links to other documents with OpenDocument extensions (such as .ODT, .ODS, and .ODP), this option converts the file names to .PDF in the exported PDF document.
Export URLs relative to file system
If you have defined relative links in a document, this option exports those links to the PDF.
Cross-document links
Defines the behavior of links clicked in PDF files.
Security page of PDF Options dialog
PDF export includes options to encrypt the PDF (so it cannot be opened without a password) and apply some digital rights management (DRM) features.
With an open password set, the PDF can only be opened with the password. Once opened, there are no restrictions on what the user can do with the document (for example, print, copy, or change it).
With a permissions password set, the PDF can be opened by anyone, but its permissions can be restricted. See Figure 17.
With both the open password and permission password set, the PDF can only be opened with the correct password, and its permissions can be restricted.
Note |
Permissions settings are effective only if the user’s PDF viewer respects the settings. |
Figure 18 shows the dialog displayed when you click the Set open password button on the Security page of the PDF Options dialog.
After you set a password for permissions, the other choices on the Security page (shown in Figure 17) become available. These selections are self-explanatory.
Calc can export spreadsheets to XHTML. Choose File → Export. On the Export dialog, specify a file name for the exported document, then select the XHTML in the File format list and click the Export button.
Calc can save files as HTML documents. Use File → Save As and select HTML Document, or File → Wizards → Web Page.
If the file contains more than one sheet, the additional sheets will follow one another in the HTML file. Links to each sheet will be placed at the top of the document. Calc also allows the insertion of links directly into the spreadsheet using the Hyperlink dialog.
LibreOffice provides several quick and easy ways to send spreadsheets as an e-mail attachment in one of three formats: OpenDocument Spreadsheet (LibreOffice’s default format), Microsoft Excel, or PDF.
Note |
Documents can only be sent from the LibreOffice menu if a mail profile has been set up. |
To send the current document in OpenDocument format:
Choose File → Send → Document as E-mail. LibreOffice opens your default e-mail program with the spreadsheet (*.ODS) document attached.
In your e-mail program, enter the recipient, subject, and any text you want to add, then send the e-mail.
File → Send → E-mail as OpenDocument Spreadsheet has the same effect.
If you choose E-mail as Microsoft Excel, LibreOffice first creates a file in Excel format and then opens your e-mail program with the *.XLS file attached.
Similarly, if you choose E-mail as PDF, LibreOffice first creates a PDF using your default PDF settings (as when using the Export Directly as PDF toolbar button) and then opens your email program with the *.PDF file attached.
E-mailing a spreadsheet to several recipients
To e-mail a document to several recipients, you can use the features in your e-mail program or you can use LibreOffice Writer’s mail merge facilities to extract email addresses from an address book.
For details, see Chapter 10, Printing, Exporting, and E-mailing, in the Getting Started guide.
To sign a document digitally, you need a personal key, also known as a certificate. A personal key is stored on your computer as a combination of a private key, which must be kept secret, and a public key, which you add to your documents when you sign them. You can get a certificate from a certification authority, which may be a private company or a governmental institution.
When you apply a digital signature to a document, a checksum is computed from the document’s content plus your personal key. The checksum and your public key are stored together with the document.
When someone later opens the document on any computer with a recent version of LibreOffice, the program will compute the checksum again and compare it with the stored checksum. If both are the same, the program will signal that you see the original, unchanged document. In addition, the program can show you the public key information from the certificate. You can compare this key with the public key that is published on the web site of the certificate authority.
Whenever someone changes something in the document, this change breaks the digital signature.
On Windows operating systems, the Windows features of validating a signature are used. On Solaris and Linux systems, files that are supplied by Thunderbird, Mozilla or Firefox are used. For a more detailed description of how to get and manage a certificate, and signature validation, see “Using Digital Signatures” in the LibreOffice Help.
To sign a document:
Choose File → Digital Signatures.
If you have not saved the document since the last change, a message box appears. Click Yes to save the file.
After saving, you see the Digital Signatures dialog. Click Add to add a public key to the document.
In the Select Certificate dialog, select your certificate and click OK.
You see again the Digital Signatures dialog, where you can add more certificates if you want. Click OK to add the public key to the saved file.
A signed document shows an icon in the status bar. You can double-click the icon to view the certificate.
You may wish to ensure that personal data, versions, notes, hidden information, or recorded changes are removed from files before you send them to other people or create PDFs from them.
In Tools → Options → LibreOffice → Security → Options, you can set Calc to remind (warn) you when files contain certain information and remove personal information automatically on saving.
To remove personal and some other data from a file, go to File → Properties. On the General tab, uncheck Apply user data and then click the Reset button. This removes any names in the created and modified fields, deletes the modification and printing dates, and resets the editing time to zero, the creation date to the current date and time, and the version number to 1.
To remove version information, either go to File → Versions, select the versions from the list and click Delete, or use Save As and save the file with a different name.