Calc Guide

Chapter 6
Printing, Exporting, and E mailing





Copyright

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.

Note for Mac users

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

Copyright 2

Note for Mac users 2

Quick printing 4

Controlling printing 4

Selecting general printing options 5

Printing multiple pages on a single sheet of paper 5

Selecting sheets to print 6

Using print ranges 7

Defining a print range 7

Adding to the print range 7

Removing a print range 7

Editing a print range 7

Printing rows or columns on every page 8

Defining a custom print range 9

Page breaks 10

Inserting a page break 10

Row break 10

Column break 10

Deleting a page break 10

Printing options setup in page styles 11

Headers and footers 12

Setting a header or a footer 12

Header or footer appearance 13

Setting the contents of the header or footer 14

Exporting to PDF 15

Quick export to PDF 15

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

Exporting to XHTML 21

Saving as Web pages (HTML) 21

E-mailing spreadsheets 21

E-mailing a spreadsheet to several recipients 21

Digital signing of documents 21

Removing personal data 22



Quick printing

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.

Controlling printing

For more control over printing, use the Print dialog (File Print or Ctrl+P).

Frame15

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:

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.

Frame2

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:

  1. In the Print dialog, select the Page Layout tab (Figure 3).

Frame1

  1. 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.

  1. In the Page sides section, select whether to print all pages or only some pages.

  2. Click the Print button.

Selecting sheets to print

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.

Frame3

Printing an individual sheet:

  1. In the spreadsheet, click on the sheet tab to select the sheet you want to print.

  2. Choose File Print from the menu bar.

  3. In the Ranges and copies section of the Print dialog, choose the Selected sheets option.

  4. Click the Print button.

Printing a range of sheets:

  1. In the spreadsheet, select the sheets to print.

    1. Select the first sheet.

    2. Hold down the Control key.

    3. Click on the additional sheet tabs.

    4. Release the Control key when all required sheets are selected.

  2. Choose File Print from the menu bar.

  3. In the Ranges and copies section of the Print dialog, choose the Selected sheets option.

  4. Click the Print button.

Printing a selection of cells:

  1. In the document, select the section of cells to print.

  2. Choose File Print from the menu.

  3. In the Ranges and copies section of the Print dialog, select the Selected cells option.

  4. 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.

Using print ranges

Print ranges have several uses, including printing only a specific part of the data or printing selected rows or columns on every page.

Defining a print range

To define a new print range or modify an existing print range:

  1. Highlight the range of cells that comprise the print range.

  2. 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.

Adding to 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:

  1. Highlight the range of cells to be added to the print range.

  2. 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.

Removing a print range

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.

Editing a print range

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.


Frame5

Frame4

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:

  1. 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 -.

  2. 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 -.

  3. 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.

editprintrangesdialog

Defining a custom print range

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.

  1. 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.)

  2. 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.

Frame6

  1. Click the More button in the dialog and then select the Print range option. Click the Add button.

  2. 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:

  1. Choose Format Print Ranges Edit (Figure 5). The previously defined area now appears in the drop-down box under Print range.

  2. 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.

Page breaks

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.

Inserting a page break

To insert a page break:

  1. Navigate to the cell where the page break will begin.

  2. Select Insert Manual Break.

  3. Select Row Break or Column Break depending on your need.

The break is now set.

Row break

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.

Column break

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.

Deleting a page break

To remove a page break:

  1. Navigate to a cell that is next to the break you want to remove.

  2. Select Edit Delete Manual Break.

  3. 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.

Frame11

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.

Print

You can specify which details to print. These details include:

Scale

Use the scale features to control the number of pages the data will print on.

Headers and footers

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.

Setting a header or a footer

To set a header or footer:

  1. Navigate to the sheet that you want to set the header or footer for. Select Format Page.

  2. Select the Header (or Footer) tab.

  3. 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.

Frame7

Header or footer appearance

To change the appearance of the header or footer, click the More button in the dialog. This opens the Border/Background dialog.

Frame8

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.

Frame9

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.

Exporting to PDF

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.

Quick export to PDF

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

Images section

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

Frame16

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.

Frame12

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

Frame20

User interface options section

Transitions

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.

Frame10

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.

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.

Frame18

Frame19

Exporting to XHTML

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.

Saving as Web pages (HTML)

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.

E-mailing spreadsheets

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:

  1. Choose File Send Document as E-mail. LibreOffice opens your default e-mail program with the spreadsheet (*.ODS) document attached.

  2. 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.

Digital signing of documents

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:

  1. Choose File Digital Signatures.

  2. If you have not saved the document since the last change, a message box appears. Click Yes to save the file.

  3. After saving, you see the Digital Signatures dialog. Click Add to add a public key to the document.

  4. In the Select Certificate dialog, select your certificate and click OK.

  5. 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.

Removing personal data

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.