Formatting cells in OpenOffice.org Calc
I've seen spreadsheets that are basically interactive tutorials, and many more loaded with what Edward Tufte refers to as "chartjunk" -- embellishments that do nothing to make the presentation of information more effective. Yet, generally, spreadsheets are treated pragmatically. Certainly, few people worry about their layout than the layout of text documents. Still, even if you share this attitude, learning the basic formatting options for cells in OpenOffice.org Calc can be worth your time. Many of the options directly effect how you interact with spreadsheets, and even the purely visual ones can make your lists and calculations easier to read at a glance.
If you just want a quick splash of color, you can format an entire sheet by selecting Format > Autoformat, or the Choose Theme icon (which seems to have disappeared in the default settings, but is retrievable via Tools > Customize > Toolbars).
However, although you can save your own autoformats, for versatility, nothing beats using cell styles and creating your own default template. Styles aren't as much a necessity in Calc as they are in Writer, since you can still access features even if you don't use them, but they are just as much time-savers, especially if you continually use the same designs.
As in Writer, styles in Calc are available by selecting Format > Styles and Formatting or by pressing F11. If you insist on manual formatting, the same options are available using Format > Cells. The options for each style include both visual and functional formatting, although the style window, unfortunately, isn't organized with those distinctions in mind.
What options should you choose for your cell styles? Without marching through every single option, here are some you should consider whenever you design a spreadsheet.
Visual Formatting
The cell style window focus largely on visual formatting. Visual options are available on five tabs: Font, Font Effects, Alignment, Borders, and Background, all of which you'll find elsewhere in OpenOffice.org.
Tastes differ, but, for me, the most essential of these tabs is Alignment. In a holdover from the earliest days of the personal computer, Calc, like any spreadsheet application, defaults to displaying only a limited number of characters. Having come late to spreadsheets in my computer interactions, I much prefer to adjust column widths and use the Alignment tab to enable automatic text wrap and hyphenation -- or, very occasionally, shrinking the text to fit the cell. The Alignment tab also includes options for setting text vertically or on an angle, which can be useful for headers in narrow columns, but these are secondary, less essential options so far as I'm concerned.
After the Alignment tab, the Font tab should be your next stop. Spreadsheets tend to be online documents, so choosing a sans serif or slab serif font will usually make for easier reading. You may also want to use a different font size for headers or sub-total and total labels. Again, remembering what generally works best online, you should choose a bold weight instead of an italic or oblique one. Choices from the Font Effects should be kept to a minimum, although you might want to change the default black font color. Mostly, the other Font Effects will add little to the effectiveness of your spreadsheets.
The remaining tabs are less essential. The Background tab may be useful if you need to brand your spreadsheet for corporate use, or possibly as another way to emphasize headers or totals. Probably the least useful tab for visual formatting is Borders, although you might want to give it some attention if you plan to print your sheet and believe that a spreadsheet should look like a spreadsheet even when it's printed. For both background and border options, you may prefer to use a page style if you want the same settings for an entire sheet. If that's not what you want, the cell setting overrides the page setting.
Functional formatting
The most important of the functional tabs is Numbers. This tab sets how input to a cell is interpreted and displayed. The default category is Numbers, which interprets any numerals you enter into the cell as numbers and displays them on the bottom right of the cell -- behavior that has puzzled more than one spreadsheet novice. If you don't want that formatting, then Text is a better choice for you. You may also want to create styles for displaying Date, Time, and Currency. The Numbers tab also has a wide variety of other categories that you might need, including Percent, Fraction, Scientific, and Boolean, all of which come with their own selection of format options.
The Numbers tabs also includes settings for the number of decimal places and leading zeroes in your calculations. The decimal place setting overrides the general setting in Tools > Options > OpenOffice.org Calc > Calculate, although you should select Precision as Shown in the same general setting Tab to avoid any potential problems.
The other functional tab is Cell Protection. The name is actually somewhat misleading, since the tab does not set cells to right-only, but sets options for hiding their contents. On Cell Protection, you can select whether to hide all content in cells that use the style, or only those that contain formulas. You also have the option of hiding the cell when printing the spreadsheet.
Setting up and using styles
Calc comes with five pre-defined cell styles: Default, Heading, Heading1, Result and Result2. If your needs are simple, you may not need to create others. Instead, you may prefer to tweak the pre-defined styles to your liking.
Another option is to create a separate style for each different formatting option or combination of options that you might want to use -- for example, Red Background, Currency or Default, Borders, Protected. You can save time if you remember that cell styles are hierarchical, and that you can make one style the child of another by entering its parent in the Linked with field on the Organizer tab.
Within the spreadsheet, applying the formatting is simply a matter of selecting the cells, then clicking the cell style to apply to it in the Styles and Formatting window. However, all this planning takes time, and you won't want to repeat it, so when you are done, don't forget to use File > Template > Save so that you can easily use the same design on other spreadsheets. As with any office application styles, the more you use similar documents, the more time you'll save in the long run by taking time at the outset to get yourself organized.
Bruce Byfield is a computer journalist who writes regularly for the Linux Journal and NewsForge websites.
--
Bruce Byfield (nanday)
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Reply to comment | Linux Journal
7 hours 14 min ago - Nice article, thanks for the
17 hours 54 min ago - I once had a better way I
23 hours 40 min ago - Not only you I too assumed
23 hours 58 min ago - another very interesting
1 day 1 hour ago - Reply to comment | Linux Journal
1 day 3 hours ago - Reply to comment | Linux Journal
1 day 10 hours ago - Reply to comment | Linux Journal
1 day 10 hours ago - Favorite (and easily brute-forced) pw's
1 day 12 hours ago - Have you tried Boxen? It's a
1 day 18 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
Formating cells.
Can I format a cell in calc to show degrees? For example if I type in 380° it would show 020°. I trying to make a calculator that could help me out with finding out the right degree when you calculate the difrenc between magnet pole and the north pole for example.
help!
we've just gotten an openoffice cal for use...how to get the column/row to just 'write' what is written and not compute it...is it the same as ms?
awesome, thanks
This is exactly the info I was looking for!!! Can anyone tell me if the formatting is preserved when a spreadsheet is uploaded to Google Spreadsheets?
Problem
I have a working formula as follows
='Serial Numbers'.D19
If I try to edit the cell by even just deleting the digit 1 and typing 1 again, the cell just displays the formula in it, not the value it was supposed to look up. The only way to get it to work again is to copy and past from another working cell below it.
Even deleting and typing it in from scratch does not work.
Problem solved
I got it..Cell seems to be formatted as text, changing the column over to "number format" worked just fine :)
Now, let's say I want to add the following to a new row in that column....0334872739.....it will drop the first 0 because the column is formatted as a number..
Good tips
I'm using Openoffice from 5 months,only to view the spreadsheet price lists I receive by email, but after reading this article I could be start to use it for other purposes.
RE
I also started using it for basic spreadsheet stuff, but I'm now using more functionalities
OpenOffice.org Calc Date Styling
I want to create a template style for displaying dates in headers and/or footers like this: 2007-01-03, dynamic or static.
Would that be possible?
OOo Questions
You'll get more and faster answers (many from experts) by posting (emailing) your questions to users@openoffice.org.
If you do not wish to subscribe to this fairly active list, it's good to include a request for answers to be copied to your email address (as well as to the list). That way you'll see the answers without revisiting the list online.