Find the Theme and Its Relationship
Open the workbook as a ZIP archive and confirm xl/theme/theme1.xml exists. Then check xl/_rels/workbook.xml.rels for a relationship whose type ends in /theme and whose target resolves to that part. See the relationship guide if the link is broken.
<!-- xl/_rels/workbook.xml.rels -->
<Relationship Id="rId3"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"
Target="theme/theme1.xml"/>
<!-- [Content_Types].xml -->
<Override PartName="/xl/theme/theme1.xml"
ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>
What a Healthy theme1.xml Looks Like
The root is an a:theme element in the DrawingML namespace. Inside a:themeElements sit three required schemes, in this order: colors, fonts, then formats. This is the structure of the clean reference workbook, with the long lists of fills, lines, and script fonts summarised in comments:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">
<a:themeElements>
<a:clrScheme name="Office">
<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>
<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>
<a:dk2><a:srgbClr val="0E2841"/></a:dk2>
<a:lt2><a:srgbClr val="E8E8E8"/></a:lt2>
<a:accent1><a:srgbClr val="156082"/></a:accent1>
<a:accent2><a:srgbClr val="E97132"/></a:accent2>
<a:accent3><a:srgbClr val="196B24"/></a:accent3>
<a:accent4><a:srgbClr val="0F9ED5"/></a:accent4>
<a:accent5><a:srgbClr val="A02B93"/></a:accent5>
<a:accent6><a:srgbClr val="4EA72E"/></a:accent6>
<a:hlink><a:srgbClr val="467886"/></a:hlink>
<a:folHlink><a:srgbClr val="96607D"/></a:folHlink>
</a:clrScheme>
<a:fontScheme name="Office">
<a:majorFont>
<a:latin typeface="Aptos Display" panose="02110004020202020204"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
<!-- script-specific <a:font script="Jpan" .../> entries follow -->
</a:majorFont>
<a:minorFont>
<a:latin typeface="Aptos Narrow" panose="02110004020202020204"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
<!-- script-specific <a:font script="Jpan" .../> entries follow -->
</a:minorFont>
</a:fontScheme>
<a:fmtScheme name="Office">
<a:fillStyleLst> <!-- three fill styles --> </a:fillStyleLst>
<a:lnStyleLst> <!-- three line styles --> </a:lnStyleLst>
<a:effectStyleLst> <!-- three effect styles --> </a:effectStyleLst>
<a:bgFillStyleLst> <!-- three background fills --> </a:bgFillStyleLst>
</a:fmtScheme>
</a:themeElements>
<a:objectDefaults> ... </a:objectDefaults>
<a:extraClrSchemeLst/>
</a:theme>
The ... and comments above stand in for long runs of real entries. They are explanatory placeholders, not valid content to paste into a workbook.
Missing fontScheme
a:themeElements is missing its a:fontScheme child. The color and format schemes are intact, but without a font scheme the theme is incomplete and themed fonts cannot be resolved.
<a:themeElements>
<a:clrScheme name="Office"> ... </a:clrScheme>
<!-- ← CORRUPT: no <a:fontScheme> between clrScheme and fmtScheme -->
<a:fmtScheme name="Office"> ... </a:fmtScheme>
</a:themeElements>
Fix: First restore theme1.xml from a backup or from a clean copy of the same workbook. If neither exists, insert a complete font scheme between clrScheme and fmtScheme. The clean workbook uses Aptos Display for headings and Aptos Narrow for body text; a different Office version will use different fonts, so inspect charts and shapes afterwards.
<!-- Fixed: fontScheme inserted between its siblings -->
<a:themeElements>
<a:clrScheme name="Office"> ... </a:clrScheme>
<a:fontScheme name="Office">
<a:majorFont>
<a:latin typeface="Aptos Display" panose="02110004020202020204"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
<!-- script-specific <a:font script="Jpan" .../> entries follow -->
</a:majorFont>
<a:minorFont>
<a:latin typeface="Aptos Narrow" panose="02110004020202020204"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
<!-- script-specific <a:font script="Jpan" .../> entries follow -->
</a:minorFont>
</a:fontScheme>
<a:fmtScheme name="Office"> ... </a:fmtScheme>
</a:themeElements>
A full Office font scheme also lists supplemental script fonts such as Jpan, Hang, and Arab. They are not required for the file to be valid, but copying them from a clean theme keeps text in those scripts looking right.
Missing Color Scheme or Format Scheme
One of the other two required schemes has been removed. A theme with no a:clrScheme has no palette, and a theme with no a:fmtScheme has no fill, line, or effect styles. Both are required children of a:themeElements.
<!-- Theme_MissingColorScheme -->
<a:themeElements>
<!-- ← CORRUPT: no <a:clrScheme> -->
<a:fontScheme name="Office"> ... </a:fontScheme>
<a:fmtScheme name="Office"> ... </a:fmtScheme>
</a:themeElements>
<!-- Theme_MissingFormatScheme -->
<a:themeElements>
<a:clrScheme name="Office"> ... </a:clrScheme>
<a:fontScheme name="Office"> ... </a:fontScheme>
<!-- ← CORRUPT: no <a:fmtScheme> -->
</a:themeElements>
Fix: The color scheme is short enough to restore by hand if you want the standard Office palette. Insert it as the first child of a:themeElements. The format scheme is far too long to retype and has to come from a backup or a clean workbook of the same Office version; copy the whole a:fmtScheme element and insert it after a:fontScheme.
<!-- Fixed: color scheme restored as the first child of <a:themeElements> -->
<a:themeElements>
<a:clrScheme name="Office">
<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>
<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>
<a:dk2><a:srgbClr val="0E2841"/></a:dk2>
<a:lt2><a:srgbClr val="E8E8E8"/></a:lt2>
<a:accent1><a:srgbClr val="156082"/></a:accent1>
<a:accent2><a:srgbClr val="E97132"/></a:accent2>
<a:accent3><a:srgbClr val="196B24"/></a:accent3>
<a:accent4><a:srgbClr val="0F9ED5"/></a:accent4>
<a:accent5><a:srgbClr val="A02B93"/></a:accent5>
<a:accent6><a:srgbClr val="4EA72E"/></a:accent6>
<a:hlink><a:srgbClr val="467886"/></a:hlink>
<a:folHlink><a:srgbClr val="96607D"/></a:folHlink>
</a:clrScheme>
<a:fontScheme name="Office"> ... </a:fontScheme>
<a:fmtScheme name="Office"> ... </a:fmtScheme>
</a:themeElements>
Incomplete Color Scheme
The color scheme is present, but entries are missing from it. A valid color scheme has exactly twelve slots in a fixed order: two dark, two light, six accents, and two hyperlink colors. Here accent4, accent5, and accent6 have been deleted.
<a:clrScheme name="Office">
<a:dk1> ... </a:dk1>
<a:lt1> ... </a:lt1>
<a:dk2> ... </a:dk2>
<a:lt2> ... </a:lt2>
<a:accent1> ... </a:accent1>
<a:accent2> ... </a:accent2>
<a:accent3> ... </a:accent3>
<!-- ← CORRUPT: accent4, accent5 and accent6 are missing -->
<a:hlink> ... </a:hlink>
<a:folHlink> ... </a:folHlink>
</a:clrScheme>
Fix: Put the missing slots back in order, between accent3 and hlink. If you cannot recover the original colors from a backup, the standard Office values below will make the file valid, but charts and shapes that use those accents will change color.
<!-- Fixed: add between accent3 and hlink -->
<a:accent4><a:srgbClr val="0F9ED5"/></a:accent4>
<a:accent5><a:srgbClr val="A02B93"/></a:accent5>
<a:accent6><a:srgbClr val="4EA72E"/></a:accent6>
Invalid Font Structure
The font scheme exists, but one of its fonts is incomplete. Each of a:majorFont and a:minorFont must begin with an a:latin element naming the Latin typeface. Here the heading font has lost it.
<a:fontScheme name="Office">
<a:majorFont>
<!-- ← CORRUPT: <a:latin typeface="..."/> is missing -->
<a:ea typeface=""/>
<a:cs typeface=""/>
...
</a:majorFont>
<a:minorFont> ... </a:minorFont>
</a:fontScheme>
Fix: Insert the a:latin element as the first child of a:majorFont. Use the font from a backup if you have one; otherwise the minor font's typeface is a safe stand-in for text but will change how headings look.
<!-- Fixed -->
<a:majorFont>
<a:latin typeface="Aptos Display" panose="02110004020202020204"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
...
</a:majorFont>
Invalid Color Values
Every srgbClr value in a theme must be exactly six hexadecimal digits. In these files the values have been replaced with ZZZZZZ (not hexadecimal) or FFF (too short). The damage also reaches the format scheme, where numeric attributes such as lumMod, satMod, and shade have been overwritten with the same bad text.
<!-- Theme_InvalidColor -->
<a:dk2><a:srgbClr val="ZZZZZZ"/></a:dk2> <!-- ← CORRUPT: not hexadecimal -->
<!-- Theme_ShortColorValue -->
<a:dk2><a:srgbClr val="FFF"/></a:dk2> <!-- ← CORRUPT: needs six digits -->
<!-- format scheme, both files: -->
<a:schemeClr val="phClr"><a:lumMod val="ZZZZZZ"/><a:satMod val="ZZZZZZ"/>...
<!-- ← CORRUPT: these must be whole numbers -->
Fix: Colors in the color scheme can be restored to the standard Office palette from the healthy example at the top of this guide, or to your own values if you know them. The numeric attributes in the format scheme are different: their original values cannot be guessed, so restore the whole theme1.xml from a backup or from a clean workbook if damage extends into a:fmtScheme.
<!-- Fixed: valid six-digit values, for example -->
<a:dk2><a:srgbClr val="0E2841"/></a:dk2>
<a:lt2><a:srgbClr val="E8E8E8"/></a:lt2>
<a:accent1><a:srgbClr val="156082"/></a:accent1>
Missing DrawingML Namespace
The theme's root element uses the a: prefix everywhere, but its declaration has been deleted. The parser cannot resolve the prefix, so the file cannot be read at all.
<a:theme name="Office Theme">
<!-- ↑ CORRUPT: xmlns:a="..." is missing, so every a: element is unbound -->
Fix: Put the namespace declaration back on the root element, using the exact URI, and leave everything else in the file alone.
<!-- Fixed -->
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">
Theme Part Missing but Still Referenced
The theme1.xml file is gone from the archive, but the workbook relationship and the manifest override still name it. Cell styles in styles.xml may use theme colors and fonts (for example <color theme="1"/>), so simply deleting the references can change how those cells look.
xl/
worksheets/
styles.xml
<- CORRUPT: theme/theme1.xml is not in the archive
<!-- still present -->
<Relationship Id="rId3" Type=".../relationships/theme" Target="theme/theme1.xml"/>
<Override PartName="/xl/theme/theme1.xml" ContentType="...theme+xml"/>
Fix: Restore xl/theme/theme1.xml from a backup of the same workbook. If none exists, copy theme1.xml from a clean, blank workbook into xl/theme/ and keep the existing relationship and override as they are. The workbook will open with the default Office theme rather than its original one. Only remove the relationship and override if you have confirmed the workbook does not rely on theme-based colors or fonts.
<!-- Fixed: theme part restored at the path the relationship expects -->
xl/theme/theme1.xml
What Not to Do
- Do not paste placeholder ellipses or an empty
fontSchemeelement into the file. - Do not replace the whole theme with an unrelated workbook's theme unless you accept the visual changes.
- Do not remove the theme relationship just because the theme is difficult to repair. First check whether the workbook depends on it.
Checklist: How to Check theme1.xml in Your File
- Rename your XLSX to .zip and open it
- Confirm
xl/theme/theme1.xmlexists at the path named by the workbook relationship - Copy it to your Desktop and open it in VS Code (with the Red Hat XML extension); a parse error points to a missing namespace or truncation
- Check that the root
a:themedeclaresxmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" - Check that
themeElementscontainsclrScheme,fontScheme, andfmtScheme, in that order - Check that the color scheme has all twelve slots and every
srgbClris six hexadecimal digits - Check that both
majorFontandminorFontbegin with ana:latinelement - Open the repaired copy in Excel and inspect charts, shapes, and theme fonts