File Corruption & Recovery

Fix Excel 365 Removing a Custom Number Format and Repairing styles.xml

Amos GikundaAmos Gikunda Nov 20, 2026 869 views

Question details

Find out why Excel 365 repairs a workbook's style information and removes a custom number format when the file is reopened.

Fix Excel 365 Removing a Custom Number Format and Repairing styles.xml
Product
Microsoft Excel 365
Device & OS
not provided
Scenario
A workbook uses a custom number format such as #,##0 ;(#,##0) and is saved and reopened in Excel.
Observed behavior
Excel reports a repair to xl/styles.xml and removes the custom number format.
Before you start

Keep an untouched copy of the workbook before opening it for repair, since Excel may remove formatting during recovery. Note the exact custom format and which cells use it so you can recreate it.

Solution 1Recommended

Repair the workbook and recreate the custom number format

Use this approach when Excel opens the workbook after reporting a styles.xml repair.

The repair may involve other style definitions, so the custom format itself is not necessarily the cause.

1
Open a copy

In desktop Excel, choose File > Open and open a copy of the affected workbook. If Excel reports a repair, review the repair message or log for references to styles.

2
Save as XLSX

Choose File > Save As and save the repaired workbook under a new name in Excel Workbook (.xlsx) format.

3
Recreate the format

Select the affected cells, right-click and choose Format Cells > Number > Custom. Enter the required format, such as #,##0 ;(#,##0), in the Type box and select OK.

4
Test the saved workbook

Save the file, close it, and reopen it in Excel. Check whether the custom format remains and whether Excel reports another repair.

Repair the workbook and recreate the custom number format
Open and Repair: In Excel for Windows, you can also choose File > Open > Browse, select the workbook, and use the arrow beside Open > Open and Repair. Review the result for lost formatting.
Free Microsoft Office alternative

Work with spreadsheet number formats in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. It opens and saves Excel-compatible files, making it easy to move everyday spreadsheet work to WPS; it does not repair Excel's own styles.xml issue.

Apply custom number formats to spreadsheet cellsOpen and save Microsoft Excel XLSX filesUse a familiar spreadsheet interfaceMove everyday spreadsheet work with a lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does a styles.xml repair mean my custom format is invalid?

Not necessarily. Excel may repair other malformed or incompatible style information in the workbook. Recreate the format through Format Cells > Number > Custom, then save and reopen the file to test it.

Where can I find the removed number format in Excel?

Select an affected cell, right-click it, and choose Format Cells > Number > Custom. If the format was removed during repair, enter it again in the Type box.

How can I tell whether another application caused the repair?

Save separate test copies in current Excel and in the other application. Reopen each copy in Excel and compare whether the styles.xml repair occurs.

What is lost when I paste values into a new workbook?

Paste Special > Values transfers cell results without the original formulas or formatting. Recreate any required formulas and custom formats in the new workbook.