Episode: 1725
Title: HPR1725: 49 - LibreOffice Calc - Creating a Template with Styles
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1725/hpr1725.mp3
Transcribed: 2025-10-18 08:16:35

---

It's Friday 13th of March 2015.
This is an HBR episode 1,725 entitled, 49, Libra Office Calc, creating a template with
tiles, and is part of the series, Libra Office.
It is hosted by AYUKA, and is about 14 minutes long.
Feedback can be sent to Wilnick at Wilnick.com, or by leaving a comment on this episode.
The summary is, we create template, recording billable time, using tiles to illustrate the
usage.
This episode of HBR is brought to you by An Honesthost.com.
Get 15% discount on all shared hosting with the offer code HBR15, that's HBR15.
Better web hosting that's honest and fair, at An Honesthost.com.
Hello, this is AYUKA, welcoming you to Hacker Public Radio, and another in our exciting
series on Libra Office Calc, and probably the last one for a while, because it's time
to move on.
What I want to do is wrap this up by doing a little project to create a template and create
styles that go into it.
What I want you to understand is that this is a demonstration, okay?
So the last few tutorials we've looked at techniques you need to master to use styles
and templates effectively.
But you need to put this into practice to really understand how this is going on.
So I'm going to create a template that's going to incorporate a few styles and put the
whole package together.
For my example, I'm going to create something useful for a consultant who needs to keep track
of time for billing customers.
Now I want to just emphasize this is an example.
It's intended to be a way of demonstrating how we use all of these techniques to put
together a nice little package.
So it's not going to be the fanciest template ever created.
But working through this, if you do, is going to give you a very good idea of how to do this
so that when you need to create one for yourself, you've got something to go with.
So the first step is always to create the template.
This must be first because the template must contain the styles you create.
I keep emphasizing that because it's tragic to have done a whole bunch of work and lose
it.
Now if you started with styles, where would you put them?
You could just open a spreadsheet and do all your work and save it as a template when
you're done.
But I actually prefer to create the template first and edit it as I go.
I'm less likely to make a mistake that way or lose my work.
So I will open Calc to a blank spreadsheet, then go to File, Templates, Save as Template.
In the window that opens, I click the Save button and then give it a name.
I called Mine, Billable Time.
Then I go to File, Templates, Manage, which opens the Template Manager.
I select the Spreadsheets tab, then the Billable Time Template, and click the Edit button.
Now when I look up the title bar in Calc, I can see that I am in BillableTime.otus,
which is exactly what I want to see.
Now anything I create is in my template.
In creating my template, I will add contents to various cells and create styles as needed.
But the first step is to check my page styles.
As we discussed when looking at page styles and page settings, I have modified my default
page style in a few ways from what you might see out of the box.
My default style is Set for Landscape and has the Grid and the Column and Row headers
turned on by default, for instance.
You can go back to our episode on page styles and page settings for a fuller discussion
of all of this.
I don't see any need to change that now, so I will leave that.
Next, I will put in my headers and footers.
I go to Edit, Headers and Footers, and I add a header in the center area that says Billable
Hours by Month and set it to Aerial Bold 14 Point.
For Footer, I already have what I want from customizing my default page style.
The left area contains the file and the path, the center of the page count, and the right
as the date.
These are fields that pick up their values automatically, so I don't need to think about
it, which is why I put them into my default page style.
The thing to keep in mind about these header and footer areas is that they show up when
the document is printed, but not when it is viewed on a screen.
So don't forget to put some info on the spreadsheet body as needed.
Now we need to start on the sheet itself.
We want to have the appropriate text labels in such in the template so that when we create
a new spreadsheet from the template, it will already have the standard text in place,
and we just need to fill in the data.
So I will start by merging and centering cells A1 through E1, entering the text, Billable
Hours 4, and selecting the heading style for it.
The heading style is to make it bold, italic, and 16 point, but I think I want to customize
this just a little so I click on the style, then right click, select modify, go to the
background tab and give it a pale blue background.
Not that this customization only applies to the heading style when it is used in this
template and documents based on this template.
If I open Calcutts some other time and get the usual default page, this style will not
have that background.
Then I will go to row 2 and select cells B2 to E2 and type client.
In this case I want it to be a lower level heading, a heading 2, so I don't see one
here.
So I will create one.
Right click in the styles and formatting window, select new and start filling it in.
On the organizer tab name it heading 2, link it to default, and place it in all styles.
On the numbers tab, format it as text.
On the font tab set it to 14 point bold, and for background I used yellow 4.
Now in row 3 I want a third level header, so this will be called heading 3, format it
as text, and the font to bold italic 12 point, and for background pale green.
Then I use this for cells A3 through E3, and in cell A3 I type date, and I type a number
1 in cell A4, and then fill to get numbers up through 31.
This gives me a month worth of numbers on the sheet.
When I create a document from this template, I will fill in the names of my clients in
cells B1, C1, D1, and E1.
And if you have more clients than that, extend your headers through additional columns.
So when I put in the names of my clients at the beginning of the month or as needed,
I can then open my sheet every day to enter my billable hours.
But of course at the end of the month I will want to total my hours and build them.
So I selected cell A36 applied heading 2, did the same for cell A38, and then in cell
A40 I applied the style heading 3.
And going back to cell A36 I entered total hours.
In cell A38 I entered total build, and in cell A40 I entered invoice number.
Now I go to cell B36, and put in the formula equals sum, open parent, B4, colon, B34,
close parent.
Right now, since there is not any data here, the cell will display zero.
But as you add hours each day, the total will mount up.
This is basically just adding up the total hours for this particular client for the month.
Then I fill this formula by clicking and dragging through cell C36, D36, and E36.
So I now have sums for all of those as well.
And in cell B38 I need to multiply the hours by the billing rate.
So I'll enter the formula equals B36 star 50.
Since I will assume my billing rate is $50 per hour, or dollars for me may be something
different from you.
And again, I will click and drag to fill across the other columns.
Well, this covers just one month, but what if you want to cover an entire year?
Simple, just copy the sheet.
Click on the tab on the bottom that says sheet 1, hold down the control key to force a copy
and drag to the right.
You'll now have a sheet that says sheet 1 underscore 2.
Repeat this 10 more times and you should have 12 sheets.
At this point, I would go back and name each sheet as January, February, et cetera.
To do this, you just right click on the sheet tab, choose rename sheet and type in the month.
And then when you've done this for all 12 months, go back to the header on row 1 that
currently reads billable hours for and fill in the month name there as well.
If you followed my procedure and saved this as a template and then opened the template
for editing.
All you need to do now is click the save icon.
If you want to double check, look at the title bar up at the very top of the window.
If it has the name of a template with the dot OTS extension, that is Oscar Tango Sierra,
you are saving a template.
If you don't see this, be careful as you are in an ordinary document.
In that case, go to file templates save as template to make sure you save it properly.
See our discussion above on how to do this.
Now that you have the template, you can put it to use.
In Calc, go to the file new templates, select your template and click open.
You will have an untitled document based on the template, but it is already set up with
your headers, your formulas and your labels.
All you need to do is start adding data.
Now if you would like to take a look at a copy of this template, which I created as an
exercise, there is a link in the show notes.
You can download it from my website and I would be happy for you to have a copy and use
it, modify it or just study it as the case may be, because I think that is a very good
way to get a handle on how this stuff works.
So this is Ahuka for Hacker Public Radio, signing off, reminding you as always to support
free software.
Bye bye.
You've been listening to Hacker Public Radio at Hacker Public Radio dot org.
We are a community podcast network that releases shows every weekday Monday through Friday.
Today's show, like all our shows, was contributed by an HBR listener like yourself.
If you ever thought of recording a podcast, then click on our contribute link to find out
how easy it really is.
Hacker Public Radio was founded by the digital dot pound and the infonomican computer club
and is part of the binary revolution at binrev.com.
If you have comments on today's show, please email the host directly, leave a comment on
the website or record a follow-up episode yourself.
On this otherwise stated, today's show is released on the Creative Commons' Attribution
ShareLife 3.0 license.
