Gendannelse af ikke-gemte, overskrevne eller beskadigede dokumenter og regneark¶
Nødnumre varierer fra land til land. Denne side bruger 911, nummeret for USA og Canada. Mange andre lande bruger 112, 999 eller et andet nummer. Find nummeret for dit land.
At lukke en 40-siders Microsoft Word-kontrakt eller en indviklet Excel-økonomisk model ved et uheld ved at klikke på "Gem ikke" og se din computer gå ned, før du rammer Ctrl + S, ved et uheld at gemme en tom skabelon over sidste års masterfil eller modtage den frygtede "Word oplevede en fejl ved at prøve at åbne filen"-dialogen minutter før en deadline føles katastrofal. Fordi moderne produktivitetsapps holder aktive redigeringer inde i flygtige RAM-buffere og skjulte midlertidige iscenesættelsesmapper (AutoRecover .asd, .wbk, .tmp, og UnsavedFiles), at foretage det forkerte træk i de første 60 sekunder kan få applikationen til at rense disse iscenesættelsesfiler for evigt.
Selv når en .docx, .xlsx, .pptx, eller .odt filen er virkelig beskadiget på disken, dine tekst- og regnearksnumre er næsten aldrig væk. Moderne Office Open XML (.docx, .xlsx, .pptx) og OpenDocument (.odt, .ods) filer er faktisk standard .zip arkivcontainere med almindelig tekst XML-filer (word/document.xml eller xl/worksheets/sheet1.xml). Selvom den ydre ZIP-centrale mappe er afkortet af strømtab eller USB-flashdrev, kan du trække 99 procent af din prosa og formler direkte ud af den rå XML-stream på under fem minutter.
Gør dette nu¶
- STOP med at skrive nye filer, installere gendannelsesprogrammer eller genstarte din computer. Hvis et program gik ned, eller du klikkede på "Gem ikke", vil den midlertidige iscenesættelsesfil (
.asd,.tmp, eller-$låsefil) sidder i dit operativsystemAppDataeller/tmpmappe lige nu. På Solid-State-drev (SSD'er) medTRIMaktiveret, lagring af store filer eller installation af bloatware-værktøjer til "dokumentreparation" på det samme drev vil permanent nulstille de ikke-allokerede flash-blokke, der indeholder dine slettede midlertidige buffere. - Hvis du lige har overskrevet en kritisk tekstpassage inde i et STILL-ÅBENT dokument og trykker
Ctrl + S(Gem), luk IKKE vinduet, trykCtrl + Z(Command + Zpå Mac) gentagne gange. I Microsoft Word, Excel, LibreOffice, Google Docs og Apple Pages vil et klik på "Gem" skrive den aktuelle tilstand til disken men rydder IKKE Fortryd-stakken i hukommelsen, så længe dokumentvinduet forbliver åbent. PresserCtrl + Z50 eller 100 gange vil træde tilbage lige forbi din utilsigtede lagring og gendanne de slettede afsnit, som du derefter kan kopiere til en ny fil. - Før du rører ved en beskadiget
.docx,.xlsx,.pdf, eller.sqlitefil, dupliker den to gange (Copy 1ogCopy 2) i en sikker mappe. Kør aldrig Microsoft Words "Åbn og reparer",zip -FF, ellersqlite3 .recoverdirekte på din eneste originale kopi af en beskadiget fil. Arbejd altid på en duplikat, så hvis et reparationsværktøj trunkerer en ulæselig tabel, forbliver dine originale råbytes uberørte til en dybere retsmedicinsk udvinding. - Tjek den skjulte
UnsavedFilesmappe i Microsoft Word, Excel og PowerPoint med det samme. Selv når du udtrykkeligt klikker på "Gem ikke" på et helt nyt eller ændret Office-dokument, beholder moderne Microsoft Word, Excel og PowerPoint en kopi af Autogendannelsen..asdsnapshot inde%LOCALAPPDATA%\Microsoft\Office\UnsavedFilesi fire dage, før du sletter den. Åbn Fil > Info > Administrer dokument > Gendan ikke-gemte dokumenter (eller Gendan ikke-gemte projektmapper i Excel) for at få fat i det med det samme. - Hvis du ved et uheld har gemt en fil, der er gemt i OneDrive, Google Drive, Dropbox, iCloud Drive eller SharePoint, skal du gendanne den via webversionshistorik på 30 sekunder. Cloud-synkroniseringsmotorer overskriver ikke filer destruktivt; hver gang
Ctrl + Ssynkroniseres til skyen, tilføjer serveren et tidsstemplet øjebliksbillede til filen Versionshistorik (beholder de sidste 25 til 500 versioner i 30 dage). Højreklik på filen -> Versionshistorik for at gendanne det nøjagtige minut før fejlen. - Hold perspektiv under akademiske, juridiske eller medicinske nødsituationer med høj stress. Intet tabt regneark eller speciale er en fysisk helbredskrise værd. Hvis du forsøger at genvinde kritiske medicinske direktiver eller nødjournaler under en aktiv trussel mod livssikkerhed, skal du prioritere menneskelig sikkerhed først og ringe til dit lokale alarmnummer (911 i USA og Canada, 112 i hele EU, 999 i Storbritannien, eller se vores alarmnumre bibliotek).
Betal aldrig 'online DOCX/XLSX reparationswebsteder' eller upload fortrolige juridiske, medicinske eller skattemæssige filer til tredjeparts cloud-reparationsportaler
Snesevis af uovertrufne websteder rangerer i toppen af søgemaskiner, der hævder at "reparere beskadigede Word- og Excel-filer online." De fleste af disse websteder kører simpelthen den gratis open source zip -FF eller xmllint kommando på deres server, vise dig en sløret forhåndsvisning af din egen tekst, og kræve 29 til 49 dollars i Bitcoin- eller kreditkortbetalinger for at downloade XML-filen, mens du høster dine fortrolige selvangivelser, adgangskoder eller juridiske kontrakter på en upålidelig udenlandsk server. Du kan udføre nøjagtig den samme ZIP/XML-udtrækning lokalt på din egen computer på 60 sekunder gratis ved at bruge nedenstående trin.
Dokument- og regnearkgendannelse triage beslutningstræ¶
flowchart TD
Start["Dokumentnød: Ikke-gemt, overskrevet eller beskadiget fil"] --> Scenario{"Hvilken fiasko er der lige sket?"}
Scenario -->|"1. Klik på 'Gem ikke', eller appen gik ned før lagring"| UnsavedPath["Trin 1: Tjek Fil > Info > Administrer dokument > Gendan ikke-gemte dokumenter<br/>Trin 2: Kopier alle .asd-, .xlb- og .tmp-filer fra AppData\Local & Roaming\Microsoft\Word/Excel<br/>Trin 3:På Mac skal du kontrollere $TMPDIR/TemporaryItems-mappen og AutoRecoveryItems"]
Scenario -->|"2. Overskrev fil ved et uheld og tryk på Gem (Ctrl+S)"| OverwritePath{"Er dokumentvinduet stadig åbent?"}
OverwritePath -->|"Ja: Stadig åben"| UndoNow["Tryk på Ctrl+Z (Cmd+Z) gentagne gange -> Kopier gendannet tekst til en ny fil -> Gem som"]
OverwritePath -->|"Nej: Allerede lukket"| VersionPath["Trin 1: Tjek Cloud-versionshistorik (OneDrive, Google Drive, Dropbox, iCloud)<br/>Trin 2: På Windows, inspicer NTFS Volume Shadow Copies ('Tidligere versioner' / ShadowExplorer)<br/>Trin 3: På Mac, tjek APFS Local Snapshots, Time Machine eller 'Revert To> Gennemse"]
Scenario -->|"3. Fil nægter at åbne ('Fil beskadiget/ulæseligt indhold')"| CorruptPath{"Hvilken type fil er beskadiget?"}
CorruptPath -->|"Moderne Office (.docx, .xlsx, .pptx) eller LibreOffice (.odt, .ods)"| ZipXML["1. Dupliker fil -> Prøv 'Åbn og reparer' i Word/Excel eller åbn i LibreOffice<br/>2. Omdøb kopi til .zip -> Kør '7z x' eller 'zip -FF' -> Udpak word/document.xml eller xl/sharedStrings.xml"]
CorruptPath -->|"Ældre binære kontor (.doc, .xls) eller PDF (.pdf)"| BinaryFix["Udpak strenge via 'Gendan tekst fra enhver fil' ELLER reparer PDF xref-tabel med 'qpdf --decrypt' / 'mutool clean'"]
CorruptPath -->|"SQLite-database (.sqlite, .db) eller CSV"| DBFix["Kør 'sqlite3 corrupt.db \".recover\"| sqlite3 fixed.db' for at genopbygge B-træ sider"]
Scenarie 1: Gendannelse af IKKE-GEMTE dokumenter (efter at have klikket på "Gem ikke" eller et appnedbrud)¶
Når du arbejder i Microsoft Word, Excel, PowerPoint, LibreOffice eller Adobe-apps, skriver programmet periodiske AutoRecover-snapshots (som standard hvert 10. minut) og midlertidige swap-buffere (-WRDxxxx.tmp) til skjulte systemmapper.
Præcis skjulte filstier til ikke-gemte og autogendan filer på tværs af Windows, macOS og Linux¶
Åbn en File Explorer, Finder (Cmd + Shift + G), eller Terminal-vinduet og tjek disse nøjagtige mapper umiddelbart før du åbner og lukker programmet flere gange:
| Applikation & OS | Præcis mappesti, der indeholder ikke-gemt .asd, .tmp, og Autogendan filer |
Filudvidelser at se efter |
|---|---|---|
| Microsoft Word, Excel og PowerPoint (Windows) | 1. %LOCALAPPDATA%\Microsoft\Office\UnsavedFiles (Filer hvor du klikkede på "Gem ikke")2. %APPDATA%\Microsoft\Word\ (eller \Excel\ / \PowerPoint\)3. %LOCALAPPDATA%\Temp\ |
.asd (AutoRecover Snapshot), .wbk (Word Backup), .xlb / .xar (Excel AutoRecover), -WRD*.tmp, -WRL*.tmp |
| Microsoft Word, Excel og PowerPoint (macOS) | 1. -/Library/Containers/com.microsoft.Word/Data/Library/Preferences/AutoRecovery (erstat Word med Excel eller Powerpoint)2. Session Temp Folder: Kør open $TMPDIR in Terminal and open the TemporaryItems subfolder |
AutoRecovery save of *.docx, .asd, -WRL*.tmp |
| LibreOffice Writer / Calc / Impress (Windows, macOS, Linux) | Windows: %APPDATA%\LibreOffice\4\user\backup\macOS: -/Library/Application Support/LibreOffice/4/user/backup/Linux: -/.config/libreoffice/4/user/backup/ og /tmp/lu* |
.bak, .odt_0.odt, lu*.tmp |
| Apple Pages, Numbers & Keynote (macOS) | 1. -/Library/Containers/com.apple.iWork.Pages/Data/Library/Autosave Information/2. -/Library/Application Support/CloudDocs/session/containers/ |
.pages, .numbers, .key package bundles |
| Notepad++ & VS Code (Even for Unnamed Unsaved Tabs) | Notepad++: %APPDATA%\Notepad++\backup\VS Code (Win): %APPDATA%\Code\User\History\ & %APPDATA%\Code\Backups\VS Code (Mac): -/Library/Application Support/Code/User/History/ |
new 1@2026-..., timestamped JSON/text history snapshots |
One-command PowerShell & macOS/Linux script to harvest all Office temp files right now¶
Instead of clicking through ten hidden folders manually, run this read-only rescue script to copy every surviving .asd, .wbk, and Office .tmp file modified in the last 48 hours into a folder on your Desktop:
- On Windows (Run in PowerShell):
$RescueDir = "$env:USERPROFILE\Desktop\Document_Rescue" New-Item -ItemType Directory -Force -Path $RescueDir | Out-Null $SearchPaths = @( "$env:LOCALAPPDATA\Microsoft\Office\UnsavedFiles", "$env:APPDATA\Microsoft\Word", "$env:APPDATA\Microsoft\Excel", "$env:APPDATA\Microsoft\PowerPoint", "$env:LOCALAPPDATA\Temp" ) Get-ChildItem -Path $SearchPaths -Include "*.asd","*.wbk","*.xar","~WRD*.tmp","~WRL*.tmp","*.docx","*.xlsx" -Recurse -Force -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -gt (Get-Date).AddHours(-48) } | ForEach-Object { Copy-Item $_.FullName -Destination (Join-Path $RescueDir ($_.LastWriteTime.ToString("HHmmss_") + $_.Name)) -Force } Write-Host "Copied all candidate recovery files to $RescueDir" - On macOS / Linux (Run in Terminal):
mkdir -p ~/Desktop/Document_Rescue find ~/Library/Containers/com.microsoft.* "$TMPDIR" ~/.config/libreoffice /tmp \ \( -iname "*.asd" -o -iname "*AutoRecovery*" -o -iname "~WR*.tmp" -o -iname "*.bak" \) \ -mtime -2 -exec cp -p {} ~/Desktop/Document_Rescue/ \; 2>/dev/null ls -la ~/Desktop/Document_Rescue/ - How to open a recovered
.asdeller-WRLxxxx.tmpfile: Do not double-click an.asdfile in File Explorer (Windows often claims it cannot open.asddirectly). Instead, launch Microsoft Word -> click File > Open > Browse -> change the file-type dropdown in the bottom-right corner to "All Files (*.*)" -> select the.asdeller.tmpfile inside yourDocument_Rescuefolder.
Scenario 2: Recovering OVERWRITTEN files (When you saved over a good file and closed the app)¶
If you accidentally opened last month's master spreadsheet, deleted half the tabs, hit Ctrl + S (Save) instead of Save As, and already closed the program, the in-memory Undo buffer is gone. However, modern filesystems and sync clients preserve historical blocks through five mechanisms:
1. Cloud Sync Version History (OneDrive, SharePoint, Google Drive, Dropbox, iCloud)¶
If the file lived inside your Desktop, Documents, or cloud folder synced by OneDrive, Dropbox, Google Drive, or iCloud:
- Microsoft OneDrive / SharePoint: Right-click the file in File Explorer (or log into onedrive.live.com) -> click Version history. Click the three dots (...) next to the timestamp from before your mistake and click Restore.
- Google Drive (even for native .docx / .xlsx files synced via Drive for Desktop): Right-click the file in drive.google.com -> File information > Manage versions, or open the document and press Ctrl + Alt + Shift + H to view full revision history.
- Dropbox: Right-click the file -> Version history (retains every save for 30 to 180 days; even if you overwrote 100 files at once, Dropbox Rewind rolls the entire folder back to any minute).
- Apple iCloud Drive & macOS Native Versioning (NSDocument Versions): On macOS, open the overwritten file in Pages, Numbers, Keynote, TextEdit, or Preview and click File > Revert To > Browse All Versions... from the top menu bar. macOS maintains an internal SQLite/chunked document version database (/.DocumentRevisions-V100) on your APFS drive even if you do not use Time Machine.
2. Windows NTFS Volume Shadow Copies (Previous Versions og ShadowExplorer)¶
Even on a local C: drive that is not synced to any cloud, Windows periodically creates read-only point-in-time block snapshots of your drive called Volume Shadow Copies (VSS) during system restore points or updates:
1. Right-click the overwritten file (or the parent folder holding it) in File Explorer -> click Properties -> Previous Versions tab.
2. If the Previous Versions tab appears empty, do NOT stop there: Windows 10 and 11 frequently hide existing VSS snapshots in the File Explorer GUI while the shadow volumes are still sitting intact on disk.
3. Open an Administrator Command Prompt and check if shadow copies exist:
vssadmin list shadows lists one or more HARDDISKVOLUME_SHADOWCopy volumes (for example, \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3), link that snapshot directly to a folder on your C: drive so you can browse it and copy out your pre-overwritten document:
Open C:\ShadowRescue\Users\YourName\Documents\ in File Explorer and copy out the intact older version of your file.
3. macOS APFS Local Snapshots (tmutil listlocalsnapshots)¶
Even when your external Time Machine backup drive has been unplugged in a closet for two weeks, macOS automatically creates hourly APFS Local Snapshots directly on your internal Mac SSD:
# List all hidden local APFS snapshots stored on your internal Mac SSD
tmutil listlocalsnapshots /
# Mount a local snapshot read-only to extract the pre-overwritten file
mkdir -p /tmp/apfs_rescue
sudo mount_apfs -s com.apple.TimeMachine.2026-10-31-093000.local /System/Volumes/Data /tmp/apfs_rescue
cp "/tmp/apfs_rescue/Users/$USER/Documents/MyContract.docx" ~/Desktop/MyContract_Recovered.docx
Scenario 3: Repairing CORRUPTED .docx, .xlsx, .pptx, og .odt files (The ZIP + XML Surgical Extraction Method)¶
Why do modern Office documents corrupt? Starting with Microsoft Office 2007, .docx, .xlsx, og .pptx files (as well as LibreOffice .odt, .ods, og .odp files) are not single monolithic binary files. Every .docx eller .xlsx file is actually a standard PKZIP archive containing a tree of folders and UTF-8 XML files.
When a USB flash drive is unplugged without ejecting, a network share drops during a save, or Word crashes mid-write, the ZIP Central Directory Header at the very end of the file gets truncated, or a single XML tag in word/document.xml fails to close. Microsoft Word and Excel have very strict XML parsers: if even one byte in the ZIP footer or XML schema is malformed, Word refuses to open the entire 50-page document.
Step 1: Try the 3 built-in non-destructive parser overrides first¶
Always duplicate your corrupted file (Contract_Copy.docx) before testing these three quick fixes:
- Microsoft Office Built-In "Open and Repair":
- Launch Word, Excel, or PowerPoint -> click File > Open > Browse (do not click the file from the "Recent Files" list).
- Click once on your corrupted duplicate file to highlight it.
- Click the tiny down-arrow (
▼) on the right edge of the[ Open | ▼ ]button at the bottom-right of the dialog box, and select "Open and Repair...". - In Excel, if Repair fails, repeat the step and choose "Extract Data" -> "Convert to Values" or "Recover Formulas".
- Open the Corrupted
.docx/.xlsxinside LibreOffice or Google Docs: - LibreOffice Writer and Calc (free, open-source at
libreoffice.org) use a much more forgiving, fault-tolerant XML and ZIP parser than Microsoft Office. In roughly 60 percent of cases where Microsoft Word or Excel completely refuses to open a corrupted file, opening that exact same.docxeller.xlsxfil inde i LibreOffice åbner hele dokumentet rent og lader dig klikke på Filer > Gem som for at skrive en helt ny, specifikation-kompatibel.docxeller.xlsxfile. - In Excel: Reference the Broken Workbook Cells from a New Blank Workbook (External Link Extraction):
- If a corrupted
.xlsxeller.xlsworkbook crashes Excel every time you try to open it, you can pull the raw cell values out without ever opening the corrupt file: - Open a brand-new blank Excel workbook.
- In cell
A1, type an external formula referencingSheet1of your corrupted file: - Press
Enter. Excel reads the raw BIFF/XML cell stream off disk without rendering the corrupt charts, macros, or styles. Drag the fill handle across columnsAigennemZand down 1,000 rows to pull out every single number and text string in the sheet, then copy all cells and Paste Values (Ctrl + Alt + V -> Values).
Step 2: The ZIP + XML Extraction Method (Recovers 99% of text/numbers when "Open and Repair" fails)¶
If both Office "Open and Repair" and LibreOffice fail because the .docx, .xlsx, .pptx, eller .odt ZIP container is truncated, extract the internal XML files directly:
Anatomy of an Office Open XML (.docx / .xlsx / .pptx) archive¶
| Outer File Type | Rename Extension To | Internal XML File Holding Your Actual Work | What Else Lives Inside the Archive |
|---|---|---|---|
Word Document (.docx) |
.zip |
word/document.xml (100% of body text)word/header1.xml, word/footer1.xml, word/footnotes.xml |
word/media/ (Every embedded photo, PNG, and JPEG at 100% original resolution) |
Excel Workbook (.xlsx) |
.zip |
xl/sharedStrings.xml (All text strings in the workbook)xl/worksheets/sheet1.xml, sheet2.xml (All numeric values, cell coordinates, and formulas) |
xl/media/ (Embedded images)xl/calcChain.xml (Frequently the file that corrupts, deleting calcChain.xml fixes many broken .xlsx files) |
PowerPoint Deck (.pptx) |
.zip |
ppt/slides/slide1.xml, slide2.xml, etc.ppt/notesSlides/notesSlide1.xml (Speaker notes) |
ppt/media/ (All slide images, audio, and video clips) |
LibreOffice (.odt / .ods) |
.zip |
content.xml (All document text, tables, and spreadsheet cells) |
Pictures/ (All embedded graphics) |
Exact terminal / PowerShell commands to rebuild the ZIP archive and extract raw prose¶
- Lav en kopi af den beskadigede fil og omdøb dens udvidelse til
.zip(f.eks.BrokenThesis.docx->BrokenThesis.zip). - Tvangsudpak de overlevende XML- og mediefiler og ignorer ZIP-header-korruption:
- Ved brug af 7-Zip (Windows/Linux/macOS) eller
zip -FF(macOS / Linux): Standard Windows Explorer ZIP-udtrækning afsluttes, hvis ZIP-foden er beskadiget, mens 7-Zip (7z x) og Info-ZIP (zip -FF) scan sektor-for-sektor fra starten af filen og udpak hver intakt fil før trunkeringspunktet:# On macOS or Linux: Rebuild the damaged ZIP structure and extract everything zip -FF BrokenThesis.zip --out RepairedArchive.zip unzip -q RepairedArchive.zip -d Extracted_Contents/ # Or using 7-Zip (extracts word/document.xml even if the end of the file is missing): 7z x BrokenThesis.zip -oExtracted_Contents/ - Quick-Fix for Excel
.xlsxFiles (calcChain.xml&styles.xmlfjernelse): - Over halvdelen af beskadiget Excel
.xlsxfiler kan ikke åbnes kun pgaxl/calcChain.xmlellerxl/styles.xmler beskadiget, mensxl/worksheets/sheet1.xmlogxl/sharedStrings.xmlare 100 percent intact. - Indenfor
Extracted_Contents/xl/, sletcalcChain.xml, lynlås indholdet afExtracted_Contentstilbage iFixedWorkbook.xlsx, og åbn den i Excel (Excel genopbygges automatiskcalcChain.xmlpå støvlen). - Extract clean, human-readable paragraphs from a truncated
word/document.xml(ellercontent.xml): - Even if
word/document.xmlwas cut off halfway through by a power outage, it is a plain UTF-8 text file where every paragraph is wrapped in<w:p>tags and every text run is inside<w:t>Your text here</w:t>. - Run this one-line Python command (works on Windows, macOS, and Linux without installing anything) to strip all XML markup and dump your clean paragraphs into
Recovered_Prose.txt:python3 -c " import re, html, pathlib raw = pathlib.Path('Extracted_Contents/word/document.xml').read_text(encoding='utf-8', errors='ignore') raw = re.sub(r'</w:p>', '\n\n', raw) text = html.unescape(re.sub(r'<[^>]+>', '', raw)) pathlib.Path('Recovered_Prose.txt').write_text(text, encoding='utf-8') print('Saved clean text to Recovered_Prose.txt') " - On Windows PowerShell (if Python is not installed):
Scenario 4: Gendannelse af beskadigede PDF'er, ældre .doc/.xls files, and SQLite databases¶
1. Repairing Corrupted PDF Files (Damaged xref table / Failed to load PDF document)¶
A PDF file stores its page objects from the top of the file downward, and places a Cross-Reference Table (xref) og %%EOF trailer at the very bottom of the file telling the PDF reader the exact byte offset of each page. If an email attachment download or scanner transfer stops at 98 percent, the xref footer is missing and Adobe Acrobat refuses to open the file, even though 98 percent of the pages are sitting right inside the file.
- Rebuild the PDF xref table automatically using qpdf, mutool (MuPDF), or Ghostscript (gs):
# Method 1: qpdf (scans raw PDF objects and generates a brand-new xref table)
qpdf --ier-warnings BrokenFile.pdf RepairedFile.pdf
# Method 2: MuPDF mutool clean (salvages damaged PDF streams and fonts)
mutool clean -gggg BrokenFile.pdf RepairedFile.pdf
# Method 3: Ghostscript (re-renders surviving pages into a fresh PDF)
gs -o RepairedFile.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress BrokenFile.pdf
2. Legacy Binary .doc og .xls Files (Office 97 to 2003 OLE2 Compound Documents)¶
Older .doc og .xls files are not ZIP archives; they use Microsoft's binary OLE2 Compound File Binary Format. To pull text out of a corrupted .doc file:
- In Microsoft Word, go to File > Open > Browse, change the file-type dropdown next to the filename box from All Word Documents to Recover Text from Any File (*.*), and open the .doc file.
- Or on macOS/Linux, run antiword Broken.doc > rescued.txt eller strings -n 6 Broken.doc > rescued.txt.
3. Repairing Corrupted SQLite Databases (.sqlite, .db, Browser History, Accounting Apps, Apple Notes, Quicken, Zotero)¶
Hundreds of desktop and mobile applications store your data inside an SQLite 3 database file (.sqlite, .db, .sqlite3). When a computer loses power mid-transaction and you get Runtime error: database disk image is malformed (11):
1. First: Keep the -wal (Write-Ahead Log) og -shm files in the exact same folder as the .sqlite fil, når du laver din sikkerhedskopi. Ofte sidder dit seneste ikke-gemte arbejde inde database.sqlite-wal venter på at blive tjekket.
2. Run the built-in SQLite .recover engine (introduced in SQLite 3.29+, which scans raw 4KB B-tree disk pages even when the master schema table is damaged and reconstructs a clean database):
sqlite3, løb sqlite3 corrupted.db ".dump" | sqlite3 repaired.db).
4. Recovering Unsaved Google Docs, Google Sheets, and Web Browser Form Text (IndexedDB & RAM-cache)¶
What if you were typing a long report inside Google Docs, Notion, Confluence, or a web browser text box while offline (or when a tab froze before syncing to the cloud)?
- Google Docs / Sheets Offline Local Storage (IndexedDB): When you type in Google Docs or Google Sheets inside Chrome or Edge, your browser caches pending offline mutations inside your local Chrome profile directory (%LOCALAPPDATA%\Google\Chrome\User Data\Default\IndexedDB\https_docs.google.com_0.indexeddb.leveldb). Do not clear browser browsing data or sign out of Chrome. Reconnect to Wi-Fi and leave the frozen tab open for 2 minutes so the background Service Worker can flush the LevelDB queue to Google servers, or copy the text directly off the screen using Ctrl + A -> Ctrl + C (or inspect the DOM element using F12 Developer Tools -> Elements tab -> right-click the <div class="kix-page"> node -> Copy > Copy element).
- Recovering Text Lost in a Closed or Refreshed Browser Tab: If you accidentally closed or refreshed a web form (such as a grant application, support ticket, or medical intake form) after typing for an hour, press Ctrl + Shift + T (Command + Shift + T on Mac) to reopen the closed tab immediately, then press Ctrl + Z inside the text box, or inspect the browser memory dump before closing the browser process.
Prevention: Configure bulletproof document auto-save so you never lose work again¶
Spend three minutes changing these four settings across your productivity apps today:
- Drop the Microsoft Office AutoRecover interval from 10 minutes down to 2 minutes: In Word, Excel, and PowerPoint, open File > Options > Save, change "Save AutoRecover information every [ 2 ] minutes", and verify "Keep the last AutoRecovered version if I close without saving" is checked.
- Enable "Always create backup copy" in Microsoft Word: Go to File > Options > Advanced > Save and check "Always create backup copy". Every time you hit
Ctrl + SonReport.docx, Word automatically saves the previous version asBackup of Report.wbkin the same folder. - Turn on LibreOffice Automatic Backup Copies: Open Tools > Options > Load/Save > General and check "Always create a backup copy" and "Save AutoRecovery information every 5 minutes".
- Never edit critical documents directly on a cheap removable USB flash drive: Always copy the file to your internal SSD (
Documentsfolder backed by a 3-2-1 backup strategy), do your work locally, and copy the finished file to the USB thumb drive only after closing the application and clicking "Safely Remove Hardware / Eject".
Ofte stillede spørgsmål¶
I worked on a Word document for five hours that I opened directly from an Outlook or Gmail attachment, clicked "Save", closed it, and now my changes are nowhere to be found. Where did my file go?
When you double-click an attachment inside desktop Microsoft Outlook or a web browser without clicking "Save As" to your Documents folder first, your computer saves the attachment into a hidden, randomized temporary cache folder (`%LOCALAPPDATA%\Microsoft\Windows\INetCache\Content.Outlook\` on Windows, or `~/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/` on macOS). When you hit `Ctrl + S`, Word saves your five hours of edits into that hidden `Content.Outlook` sub-folder. Open Word immediately, check **File > Open > Recent** (or run the PowerShell/Terminal search script in Scenario 1 above to scan `INetCache` and `Temp` for all `.docx` files modified in the last 24 hours) and save a copy to your Desktop.
Why did my Word document turn into pages of squares, gibberish symbols, or `########` signs when I opened it from a USB flash drive?
Two distinct errors cause this symptom: (1) If the file shows solid pages of `########` or `NUL` (zero-byte `0x00`) characters in a hex editor (`HxD`), the operating system pre-allocated the file size on the FAT32/exFAT USB drive, **but the USB stick was unplugged before the write cache flushed the actual data blocks to flash memory**. In that case, inspect the computer where the file was written for surviving `.asd` / `.tmp` files, or run `chkdsk E: /f` on a copy of the USB drive to check `FOUND.000\FILE0000.CHK` orphan clusters. (2) If the file shows random ASCII symbols starting with the letters `PK` at the very top of page 1, your file is completely fine, you simply opened a modern `.docx` ZIP file using Word's "Recover Text from Any File" filter instead of the normal XML parser.
If I rename a corrupted `.docx` or `.xlsx` file to `.zip`, can I rescue the high-resolution photos and charts embedded inside the document?
Yes, and this is one of the fastest benefits of the Office Open XML format. Inside every `.docx`, `.xlsx`, and `.pptx` archive is a subfolder named `word/media/`, `xl/media/`, or `ppt/media/` (or `Pictures/` inside a LibreOffice `.odt` file). Unlike older binary `.doc` files that compressed images into proprietary streams, modern Office files store every inserted photograph, logo, and diagram as an individual, unencrypted `.png`, `.jpeg`, `.svg`, or `.emf` file inside that `media/` subfolder. Extracting the archive with 7-Zip recovers all embedded images at their full native resolution in seconds.
Can I use undelete software like Recuva or PhotoRec to recover an unsaved Word document that was never saved to disk even once?
Yes, provided you stop using the computer immediately. Even if you never pressed `Ctrl + S` on "Document1", Microsoft Word and LibreOffice still write temporary swap and AutoRecover files (`.asd` and `~WRDxxxx.tmp`) to your storage drive every few minutes once the document exceeds the small RAM buffer. However, if you live on a modern SSD with `TRIM` enabled and close the app properly, those deleted temp blocks may be trimmed quickly, so always copy the live `%LOCALAPPDATA%\Microsoft\Office\UnsavedFiles` directory **before** running a full-disk carver. For deleted files that were previously saved, follow our [accidental file deletion and formatted drive recovery](accidental-file-deletion-formatted-drive-and-photo-recovery.md) guide.
Relaterede guider¶
- Accidental file deletion, formatted drive, and photo recovery
- Harddiskfejl og datagendannelse
- Computersikkerhedskopiering: 3-2-1 strategi og gendannelse efter katastrofer
- Ransomware and malware recovery
- BitLocker, FileVault, and LUKS encryption recovery key lockout
- Nødnummeroversigt
Kilder tjekket¶
- Ecma International & ISO/IEC (International): ECMA-376 / ISO/IEC 29500 Standard: Office Open XML File Formats (Open Packaging Conventions ZIP Container and WordprocessingML / SpreadsheetML Specifications).
- OASIS (Organization for the Advancement of Structured Information Standards): OpenDocument Format (ODF) v1.3 Specification for Office Applications (
.odt,.ods,.odpXML Package Architecture). - Microsoft Learn Official Documentation: How Word Creates and Recovers AutoRecover (
.asd) and Temporary (-WRD*.tmp) Files, and Troubleshooting Damaged Documents in Word and Excel. - SQLite Consortium Officiel dokumentation: Databasekorruption, Write-Ahead-logning (
-wal), og ved hjælp af.recoverCLI-kommando på beskadigede B-Tree-filer. - Adobe / ISO 32000-2 Specification: Portable Document Format (PDF 2.0) Cross-Reference (
xref) Tabelstruktur og streamgendannelse.