Printing in OpenOffice.org Calc, Part I: Page styles
Spreadsheets are primarily used online. For this reason, printing them can be challenging even to experienced users. However, OpenOffice.org offers more help than most spreadsheets with printing, starting with the introduction of page styles. In this entry, I'll explain how Calc page styles can help with printing spreadsheets. In Part II, I'll continue by explaining the other tools available for printing in Calc.
If you use page styles in Writer, seeing them in Calc can be deceptive. Calc page styles have many of the same options as they do in Writer, and, on some tabs for style settings, you might almost believe you were in Writer. Yet the truth is, page styles offer fewer advantages in Calc than in Writer. Nor are they nearly as easy to setup and use.
Think about the differences between the two applications,and the reason is obvious. In Writer, a page style has a direct relation to the dimensions of the physical page. You can set the page size in the style, and what you see on the screen corresponds to the setting, a few editing aids accepted.
By contrast, although you can set the page size for printing, like most spreadsheets, Calc makes no attempt to display the page style on the screen. Nine times out of ten, the attempt would be pointless, since most spreadsheets are never printed. If you do want a spreadsheet to fit on a certain page size, you have to careful control the column width and row height, with only File > Page Preview and your grasp of basic arithmetic to guide you.
Because of this situation, an applied Calc page style, unlike a page style in Writer, is not visible on the screen. You have to open File > Page Preview before you can see any of it. Even then, some of the formatting is only visible as far as the last cell with content. These limitations make Calc pages difficult to work with, especially if you approach them with Writer pages in mind.
Setting up page styles
As in Writer, the Style and Formatting floating window opens in Calc when you press the F11 key, or select Format > Styles and Formatting, then right-click on an existing style to modify it or create a new one.
Always remember, though, that Cal page styles are more limited than Writers'. Calc applies page styles to each print job in its entirety, so the Next Style field on the Organizer tab is grayed out. Nor does the tab need the Linked with field, because Calc page styles are not hierarchical. In fact, whereas some Writer documents can easily make good use of a dozen different page styles, the average Calc spreadsheet can usually get along with modifications to the existing Default and Report styles. Probably, you do not even need to add an underscore or asterisk to the style name to place it at the top of the list in the floating window, so that you can easily find it.
The Border and Background tabs for pages duplicate the tabs of the same name on cell styles, and are over-ridden by the cell style or manual settings. Since over-rides in Calc do not greatly increase your efforts, the way they do in Writer, you may choose to ignore the Border and Background tabs altogether in page styles, and focus on using them to prepare for the possibility of printing your spreadsheets. However, if you do use them, you'll find that the Border tab contains the expected options for customizing the borders around cells, including their location, the thickness of their lines, and the distance between cell contents. Similarly, the Background tab gives you the option of using a color or a graphic file for fill. Both tabs are illustrated with helpful diagrams, and will be familiar to anyone who has used similarly named tabs elsewhere in OpenOffice.org.
Rather, the place to start with page styles is the Page tab. The settings on this tab are not arcane; they include the settings for page formats, orientation, margins, two-page spreads, and page numbering, exactly as you might expect. In many cases, you probably won't want to make many changes to them, but, as you are designing your spreadsheets, you should stop for a look if there is even a chance that you'll be printing so you know the column width and the number of rows you'll be using. Many times, you won't be able to restrain the spreadsheet width so easily, but doing so is always worth a try. Otherwise, if a need for printing does arise, you may lose time to trial and error that you just don't have.
As for the Header and Footer tabs, the main point in both is to add these items to each printed page. Headers and footers are more limited in Calc than in Writer. In particular, you'll find yourself limited to a single one of each, a reflection of the relative unimportance of printing for spreadsheets. However, if you choose, you can define the margins and heights of your headers and footers, and tart them up by pressing the More button to choose borders and backgrounds especially for them.
However, by far the most important settings for Calc page styles are on the Sheet tab. Although the Sheet tab includes an option that sets the first page option, most of its settings involve exactly how your spreadsheet will print.
Most of settings are in the Print pane, where you select which elements are printed. Some of the defaults are obvious. After all, why would you add a graphic and not print it? Or choose in most cases to print a formula rather than its result? However, you might want to print the row and column and headers as well as the grid, so that the printout looks like a spreadsheet, and, in some cases, to print notes.
Other options on the sheet tab set the mechanics of how your spreadsheet prints. In the Page Order pane, you set how a print job handles columns that are wider than the page: by printing first all the rows in the existing columns then moving on to the remaining columns, or printing all the tops of the column first, and the remaining rows later (a convenient diagram explains your choice if you find the description confusing).
The Scaling pane offers other alternatives to spreadsheets that don't fit a page. In a drop-down list, you can choose to reduce or enlarge a printout by the percentage you specify, or fit what you are printing to a defined width and height or a specified number of pages. These alternatives aren't always practical if readability is your goal, but they are easier to work with much of the time than setting the page order.
Formatting by other means
While Writer makes page styles unavoidable if you want complex layouts -- or even multiple footers and headers -- Calc takes a more relaxed approach to page styles. If you never plan to print, or your spreadsheets are short, then you can ignore page styles altogether.
Instead, you might prefer to focus on cell styles, which are more immediately useful. Like page styles, cell styles have settings for backgrounds and borders. Moreover, since you can apply them to any cells you have selected, they are only somewhat less convenient for physical formatting. Their only real drawback is a lack of headers and footers if you print, unless you take the time to set them up manually.
In addition to cell styles -- or in place of them -- you can apply formatting to your entire spreadsheet by selecting Format > AutoFormat. Frankly, many of the pre-defined formats are garish beyond belief, but you can use the Add button to define your own autoformats. You can also use the Choose Theme icon to choose among the built-in, unalterable themes that come with Calc, although, depending on where your version of OpenOffice.org originated, you may need to select Tools > Customize > Toolbars and add the Choose Themes icon to a toolbar.
However, if printing is even a possibility, save yourself grief and turn to page styles. They may be as necessary as their Writer equivalents, but, once you understand them, they can eliminate a lot of guesswork.
Bruce Byfield is a computer journalist who writes primarily for the Linux Journal and NewsForge sites.
Bruce Byfield (nanday)
Special Reports: DevOps
Have projects in development that need help? Have a great development operation in place that can ALWAYS be better? Regardless of where you are in your DevOps process, Linux Journal can help!
With deep focus on Collaborative Development, Continuous Testing and Release & Deployment, we offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, advice & help from the experts, plus a host of other books, videos, podcasts and more. All free with a quick, one-time registration. Start browsing now...
- The Ubuntu Conspiracy
- A First Look at IBM's New Linux Servers
- Vigilante Malware
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Libreboot on an X60, Part I: the Setup
- System Status as SMS Text Messages
- Vagrant Simplified
- Dealing with Boundary Issues
- Bluetooth Hacks
- Non-Linux FOSS: Code Your Way To Victory!