LibreOffice Calc · Sharing, safety and accessibility · Intermediate
Recover earlier document versions and protect file access
Recover earlier document versions and protect file access. A controlled example with expected outcomes, changed-input checks and recovery.
Documentary author review; no native application testing claimed · Editorial standards
Calc can store earlier versions inside an ODS document and can require a password to open a saved file. These solve different problems: a version helps recover prior content; an opening password limits access to the file’s contents.
Create a recoverable checkpoint
Use LibreOffice Calc 26.2 desktop with English standard menus on Windows or Linux. The steps are documentary, not a native-tested recovery or encryption demonstration. Practice with synthetic information and retain an ordinary backup before experimenting.
Create VersionPractice.ods. Enter Budget in A1 and 1000 in B1. Enter Revision note in A2 and Initial estimate in B2. Save the file.
- Choose File > Versions.
- Click Save New Version.
- Enter a useful comment such as
Baseline: budget 1000 before supplier revisionand confirm. - Save the document itself. The stored version belongs inside this ODS file; it is not a separate cloud-history item.
- Change B1 to 1200 and B2 to
Supplier revision, then save another named version and save the file again.
A comment should explain what makes a version worth returning to. “Version 2” alone does little to distinguish a validated checkpoint from an accidental intermediate state.
Open the earlier content safely
Return to File > Versions, select the baseline entry and choose Open. Calc opens the earlier version as a read-only copy. Verify B1=1000 and the initial note. The current document should still contain 1200; viewing a version is not the same as replacing the working file.
To recover a usable earlier document, save the read-only version under a new recovery filename rather than overwriting the current file immediately. Check the recovered budget and note before deciding which file should become your working copy.
There is an important consequence: Save As does not carry the old stored versions into the new file, according to the guide. Preserve the original ODS containing the version list if that history matters. Avoid the Versions dialog’s Delete control during recovery; it deletes the selected stored version without another confirmation.
Add an opening password to a separate copy
For the access-control exercise, return to the current original VersionPractice.ods and verify B1=1200 and B2=Supplier revision, not the recovered baseline copy. Choose File > Save As, name the new file ProtectedPractice.ods, retain OpenDocument Spreadsheet format, and select Save with password. Save, then enter and confirm a password you can retain securely. Do not use an actual account password or put the password in the workbook itself.
Close the protected copy and reopen it. Verify that opening requires the password, then enter the correct password and inspect B1. A sheet-protection password is not an equivalent check: sheet and cell protection controls editing, not whether the file’s contents can be read.
Because Save As creates a new file without the old stored versions, do not assume this encrypted copy also contains the original version history. If you need future checkpoints inside the protected document, save new versions in that document and verify their presence separately.
Verify and plan recovery
Change the protected practice budget from 1200 to 1250, save, close and reopen with the password. Confirm 1250. A correct password prompt is not enough if you accidentally protected a different file.
To remove opening protection from a practice copy, open it with the correct password, use Save As and clear Save with password. Treat the resulting file as unencrypted and keep it only where that is acceptable. This is not a password-recovery technique for a file whose password is lost.
Stored versions, backup copies and AutoRecovery are separate mechanisms. Inspect your configured backup paths and recovery settings rather than assuming they guarantee recovery from deletion or corruption. Keep a separate backup of important files, including the original version-bearing ODS, and verify you can open that backup before relying on it.