« How do you insert an em dash in OpenOffice Writer? and other shortcuts to make life easier | Main | Extension for cropping in OpenOffice Draw, and more »

February 20, 2008

Different page layouts for sheets in the same spreadsheet, in OpenOffice.org Calc

Let's talk spreadsheet page layout.

Doing it simply is simple enough. Choose Format > Page, and make your changes. Margins and orientation in the Page tab; Headers in the Header tab; Borders around the content in the Border tab; etc.

Howitworks

But....what if you've got content in a couple different sheets of your spreadsheet, or more. Let's say that the data in the first sheet is pretty wide so you'd like a landscape layout, and the data in the second sheet is narrow and a different type of information, so you'd like it not just portrait but with a different header. You want different page layout in each sheet of your spreadsheet.

Well, the way I just showed you won't work because the changes apply to the entire spreadsheet.

The reason that the changes apply to the entire spreadsheet is because the Default page style is applied to every sheet in the spreadsheet. (A page style is just a group of formatting attributes associated with a style name.) And when you choose Format > Page, even though you might not be thinking about styles at all, you're modifying the Default page style.

How to get around this? Well, you just need to have one page style on the first sheet, one page style on the second sheet, and so on.

Tabscombo

That way when  you modify one page style, you're not affecting the other sheets because the page style is only applied to that one sheet.

All right. Enough description. Here's exactly how to do it.

Step 1: Create page styles

Step 2: Apply a different page style to each sheet

Just so you see the sample, here's my spreadsheet. The first tab has a few pages of sales data; the second sheet, with different and less data, is more of a summary set of data.

Sheet1

Sheet2

Step 1: Create page styles

Choose Format > Styles and Formatting. Click the Page Styles icon at the top.

Style1

Right-click in the window and choose New.

Style2


Name the style.

Style3


Set attributes for the style.

Style4

Style5

Click OK. The style appears in the Styles and Formatting window.

Style6_2

Now make another style, the same way. Name the style.

Style7

Set attributes. (Here's how you'd change content in the header.)

Style8

Style9


Click OK. The style will appear in the Styles and Formatting window.

Step 2: Apply a different page style to each sheet

This is pretty simple. Click on the tab for the first sheet, and in the Styles and Formatting window, double-click the page style you want to apply.

Styleresults1  

Then click on the tab for the next sheet, and double-click the style for that sheet. If you want to have one style for one sheet, and another style for three other sheets, just keep going, applying the appropriate style each time.

Styleresults2

Now you can see in Page Preview that the layouts are different. Choose File > Page Preview.

Here's the layout for one of the pages in sheet1.

Show1

And here's a page in sheet2. (I zoomed in a little to show the perhaps-not-that-necessary header but trust me, it's portrait rather than landscape like the other sheet.)

Show2


Traininglogo




TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/551685/26291180

Listed below are links to weblogs that reference Different page layouts for sheets in the same spreadsheet, in OpenOffice.org Calc:

Comments

Excelente
Gracias
Great, thanks

Post a comment