Office and collaborative tools¶
Exercise office-and-collaborative-tools-annex.pdf · PDF
You have written the inventory of the Tramuntana office in a neat Markdown table: laptops, monitors, licences, prices. Then the manager walks in: "And if we hire two more designers?" In Markdown, you get out the calculator and redo every total by hand. Is there a tool that recalculates by itself?
There is, and it is one of the most used programs on Earth. Every office, from a two-person shop to a hospital, keeps a budget, a list or a timetable in one. Today you will build the inventory of Tramuntana Apps in it, share a sheet with two classmates and edit it at the same time, and find out why your Git repository prefers some files to others.
What you will learn
- Name the parts of an office suite and the three ways of getting one
- Tell the two office format families, ODF and OOXML, and show that both are ZIP archives of XML
- Build a spreadsheet with formulas:
SUM,IF,SUMIF,COUNTIFand absolute references (the$sign) - Check a spreadsheet instead of trusting it: the same total reached by two roads
- Edit a document at the same time as other people, giving each one the least permission they need
- Why Git shows you what changed in a
.csvbut not in an.ods
What is an office suite?¶
An office suite is the set of general-purpose programs every office uses: a word processor (letters, reports), a spreadsheet (tables that calculate) and a presentation program (slides).
You can get one in three ways. They are the same three rows you used in the selection matrix:
| How you get it | Example | Native format |
|---|---|---|
| Installed, free software | LibreOffice (born on 28 September 2010 from OpenOffice.org; licence MPL-2.0) | ODF: .odt .ods .odp |
| Installed, proprietary, by subscription | Microsoft 365 desktop applications | OOXML: .docx .xlsx .pptx |
| SaaS, in the browser | Google Docs, Microsoft 365 on the web, a self-hosted Collabora or ONLYOFFICE | Kept by the service; exports both |
Two formats, one trick¶
There are two big families of office files:
- ODF (Open Document Format), the native format of LibreOffice. International standard ISO/IEC 26300, from 2006.
- OOXML (Office Open XML), the native format of Microsoft Office. International standard ISO/IEC 29500, from 2008.
They look very different, but inside they use the same trick: the file is a ZIP archive (a box of compressed files) full of XML files (plain text with tags, a cousin of HTML). You can open the box with unzip:
$ unzip -l data/inventory.ods
Length Date Time Name
46 2026-10-05 20:58 mimetype
13543 2026-10-05 20:58 content.xml
14614 2026-10-05 20:58 styles.xml
[...] 9 files
content.xml holds your cells, styles.xml the fonts and colours. Remember this box: it will matter when the spreadsheet meets Git.
Careful: Excel is not the spreadsheet
Excel is one product. LibreOffice Calc, Google Sheets and others are spreadsheets too, and the ideas on this page work in all of them.
The program people bought the computer for¶
Before 1979, an accountant kept the budget on big sheets of squared paper. Change one number, and every total that depended on it had to be rubbed out with an eraser and recalculated.
Then, on 17 October 1979, Dan Bricklin and Bob Frankston released VisiCalc for the Apple II. You changed one number and every result that depended on it changed at once. It is remembered as the program people bought the computer for.
That is the analogy for this page: a spreadsheet is squared paper where every square can be a calculator, and the calculators are wired to each other.
Anatomy of a spreadsheet¶
| Word | Meaning | Example |
|---|---|---|
| Cell | One square of the paper, with an address: column letter + row number | B3 |
| Formula | What a cell calculates. Always starts with = |
=D2*E2 |
| Range | A block of cells, from the first to the last | D2:D11 |
| Function | A named calculation that takes arguments | =SUM(D2:D11) |
Change a number, and every square wired to it recalculates. Never type a result (6600) where a formula (=D2*E2) should be: the typed result is wrong the moment a price changes.
flowchart LR
D2["<b>D2</b><br>quantity: 6"] -->|"=D2*E2"| G2["<b>G2</b><br>total: 6600"]
E2["<b>E2</b><br>unit cost: 1100"] -->|"=D2*E2"| G2
G2 -->|"=IF(...)"| H2["<b>H2</b><br>first year: 6600"]
H2 -->|"=SUM(H2:H11)"| H13["<b>H13</b><br>TOTAL: 21154"]
Fill down: relative references¶
Type =D2*E2 in G2, then fill down: drag the small square at the corner of the cell down to G11. Click G5 and read its formula: =D5*E5. The references moved with the row. They are relative references: "the cell two to my left", not "cell D2".
Commas or semicolons?
LibreOffice accepts ; between arguments in every language setting, so this page uses ;. With English settings it shows them back as ,. With Spanish or Catalan settings, the decimal sign is a comma: type 0,21, not 0.21.
Functions that ask a question¶
| Function | In words |
|---|---|
=IF(F2="monthly";G2*12;G2) |
If the test is true, show the first value, otherwise the second. Here: a monthly cost counts 12 times in the first year. |
=SUMIF(B2:B11;"hardware";H2:H11) |
Add the cells of column H whose row says "hardware" in column B. |
=COUNTIF(E2:E11;0) |
Count how many cells of E are 0: the items that cost nothing. |
=ROUND(H13/12;2) |
Divide and round to 2 decimals: the cost per person. |
Text inside a formula goes between quotes. monthly without quotes gives #NAME?; a missing bracket gives Err:508 or Err:509.
The dollar sign: absolute references¶
Put the VAT rate 0.21 in cell L1. In I2 type =H2*(1+L1) and fill down. Now click I3: it says =H3*(1+L2). L2 is empty, so the "price with VAT" equals the price without it.
The reference to the VAT rate must not move. Write it as $L$1: an absolute reference. The dollar sign pins the column ($L), the row ($1), or both. In Calc, the F4 key adds the dollars to the reference under the cursor.
| You copy one row down... | It becomes | Why |
|---|---|---|
=A1*B1 |
=A2*B2 |
Both relative: both move |
=A1*$B$1 |
=A2*$B$1 |
$B$1 is pinned |
=$A1*B$1 |
=$A2*B$1 |
Only the row of A and the column of B move |
Careful: $ does not mean money
In a reference, $ means "do not move this when the formula is copied". Nothing to do with euros or dollars.
A spreadsheet never tells you it is wrong¶
England, autumn 2020. Positive COVID tests arrived as text files and were loaded into a spreadsheet in the old .xls format, which holds at most 65,536 rows. When the file was full, the rest was silently left out. Between 25 September and 2 October, 15,841 positive cases were not passed on to the people who trace contacts.
Nobody typed a wrong formula. Counting the rows that went in against the rows that came out would have caught it.
So: reach every important total by two roads. In the inventory, hardware plus software must equal the grand total. Write it as a formula in a free cell:
If it does not give 0, something is wrong. The computer calculated exactly what you asked; it is your job to check you asked the right thing.
Two ways of working together¶
When you and a partner changed the same line in Git, Git stopped and asked you to decide. In a shared online document, you would have seen each other typing.
| At the same time | In turns, with review | |
|---|---|---|
| Tool | A shared online document or spreadsheet | Git and a forge |
| You see | The other cursors, live | The other person's changes when you pull |
| Disagreement | The last one to type wins; comments and the version history help | A conflict: Git stops and a person decides |
| Good for | Meeting notes, a budget, a list several people keep alive | Text that must match a system and be checked before it is official |
Shared editing in a browser became ordinary after 2006, when Google bought the small company behind the online word processor Writely and launched Google Docs that October.
Two features make live editing safe:
- Comments: a remark attached to a cell or a sentence, which others can answer without changing the content.
- Version history: the service remembers every change and who made it, so you can see who typed cell C3 and go back to an older version.
Sharing is giving permission¶
Almost every service has three roles:
| Role | Can |
|---|---|
| Viewer | Read |
| Commenter | Read and comment |
| Editor | Change the content |
The principle of least privilege from Unit 5 applies here too: give each person the smallest role they need. The accountant comments, the manager views, the team edits. "Anyone with the link can edit" is the chmod 777 of documents: a link has no name on it.
Careful: in the cloud is not a backup
The version history protects you from a mistake. It does not protect you if you lose the account, or if the service closes. Where the data lives is a decision, not a detail.
SUMPRODUCT: a matrix in one formula¶
In the Exercise sheet you rebuild the selection matrix with your team, each person typing one candidate column at the same time. The total of each candidate uses one function:
SUMPRODUCT multiplies the weights by the scores, pair by pair, and adds the results. Fill it to the right: $B$2:$B$6 (the weights) stays, C2:C6 becomes D2:D6. The dollar sign, at work.
When the spreadsheet meets Git¶
A CSV file (Comma-Separated Values) is plain text: one line per row, values separated by commas. It stores values only: no formulas, no colours, no charts. An .ods stores everything, but it is a ZIP box.
Put the inventory in your repository twice, as .csv and as .ods, change the number of monitors in both, and ask Git what changed:
$ git diff
--- a/data/inventory.csv
+++ b/data/inventory.csv
@@ -2,7 +2,7 @@ item,category,department,quantity,unit_cost,billing
-Monitor,hardware,all,12,180,once
+Monitor,hardware,all,14,180,once
diff --git a/data/inventory.ods b/data/inventory.ods
Binary files a/data/inventory.ods and b/data/inventory.ods differ
For the .csv, Git shows the exact line and the number that changed. For the .ods, it only knows that something is different: a ZIP is not lines of text. That is the whole argument for plain text in a repository, in six lines of output.
Bonus: Pandoc turns the CSV into the Markdown table of your documentation, without typing it:
$ pandoc -f csv -t gfm data/inventory.csv
| item | category | department | quantity | unit_cost | billing |
|-------------------------|----------|------------|----------|-----------|---------|
| Laptop dev | hardware | dev | 6 | 1100 | once |
.csv |
.ods / .xlsx |
|
|---|---|---|
| What it is | Plain text with separators | ZIP archive of XML |
| Stores formulas, colours, charts | No | Yes |
git diff shows the change |
Yes, line by line | No: "Binary files differ" |
| Use it for | The data in the repository | The working file where you calculate |
Key takeaways¶
- An office suite is word processor + spreadsheet + presentations; you get it as installed free software (LibreOffice), installed proprietary (Microsoft 365) or as SaaS in the browser.
- ODF (
.odt.ods) and OOXML (.docx.xlsx) are both ZIP archives of XML. - A formula starts with
=and points at cells and ranges; references are relative and move when copied, unless you pin them with$as absolute references. IF,SUMIF,COUNTIFandSUMPRODUCTask questions of your data; check every total by two roads, because a spreadsheet never tells you it is wrong.- Shared online documents are edited at the same time; give each person the least role (viewer, commenter, editor).
- Keep data in the repository as CSV: plain text, so
git diffshows exactly what changed.
Quick check¶
1. You copy the formula =A1*\(B\)1 one row down. What does it become?
- =A1*\(B\)1
- =A2*\(B\)2
- =A2*\(B\)1
- =A1*\(B\)2
A1 is a relative reference, so it moves with the row and becomes A2. $B$1 is an absolute reference: the dollar signs pin both column and row, so it stays.
2. In the inventory, H15 holds a SUMIF with the condition software on column B and the sum range H2:H11. What does it calculate?
- The sum of the H cells whose row says software in column B
- The number of rows that say software in column B
- The sum of every cell in column H
- The word software written into the H cells
SUMIF adds only the cells of the last range whose row matches the condition in the first range. Counting matching rows is the job of COUNTIF.
3. What is an .ods file, inside?
- Plain text with values separated by commas
- A PDF document with a table
- A small database with one table per sheet
- A ZIP archive full of XML files
Both ODF (.ods, .odt) and OOXML (.xlsx, .docx) are ZIP archives of XML. You can list the files inside with unzip -l.
4. The accountant must read the shared budget and leave remarks, but change nothing. Which role do you give her?
- Editor
- Commenter
- Owner
- Anyone with the link
The principle of least privilege: give the smallest role that does the job. A commenter can read and comment but not edit. A public link has no name on it.
5. Why does the documentation repository keep inventory.csv?
- Because a CSV stores the formulas
- Because a CSV is smaller than a PDF
- Because a CSV is plain text, so Git shows what changed
- Because Calc cannot open an .ods file
A CSV is plain text, one line per row, so git diff shows the exact line and number that changed. For an .ods, Git can only say "Binary files differ". A CSV stores values only, never formulas.
6. In I2 you type =H2*(1+L1), where L1 holds the VAT rate, and fill down. In I3 the price with VAT equals the price without. Why?
- The VAT rate must be typed as a percentage, not as 0.21
- The reference to L1 moved down to L2, which is empty
- Fill down copies the results, not the formulas
- The IF function is missing from the formula
With a relative reference, L1 becomes L2 in the next row, and L2 is empty, so you multiply by 1. Pin the rate with $L$1 (F4 in Calc) and fill down again.
7. Your inventory gives a grand total of 21,154. Which check catches a silent mistake best?
- Looking at the total and deciding if it seems reasonable
- Recalculating the sheet by pressing the same key twice
- Adding hardware and software separately and checking they equal the total
- Saving the file in a different format and opening it again
A spreadsheet calculates exactly what you ask and never warns you. Reaching the same total by two roads (here =H14+H15-H13 must give 0) catches mistakes, like the rows silently lost in England in 2020.
8. Pick the two situations where a shared online spreadsheet fits better than Git.
- Three people filling in a budget together during a meeting
- The team keeping a live list of who brings what to the office party
- The installation guide of the office server, reviewed before it is official
- Configuration text that must match exactly what is on the server
Shared online documents shine for editing at the same time: notes, budgets, lists kept alive by several people. Text that must match a system and be reviewed before it is official belongs in Git, with commits and pull requests.
Next: the oldest collaborative tool still on every desk, and how a message really travels — Email and messaging.