How to Repair Excel with Command Lines on Windows

Yesterday, my Excel files were corrupted, and I received a message saying that the .xlsx is corrupted and cannot be opened. Then, my computer asked if I would like to recover the contents. How can I repair this Excel file on my computer?

We will introduce how to repair Excel with command lines and if you are not familiar with the command lines, you can try an Excel repair program. EaseUS Data Recovery Wizard for Excel repairs corrupted Excel spreadsheets (.xls, .xla, .xlsx). With it, you can recover Excel 2019, 2016, 2013, 2010, 2007, and more.

Step 1. Open EaseUS file repair software and scan the disk for damaged files. With the use of this file repair software, you can easily repair Word, Excel, PPT, and PDF files that have been damaged.

Step 2. This software will scan your chosen disk and find all the corrupted Excel files.

Step 3. The EaseUS file repair option will fix your damaged Excel file automatically

If some Windows functions aren't working or Windows OS crashes, use the System File Checker to scan Windows and restore your files. But the SFC scannow command can only solve the system file corruptions. Thus, if you want to repair Excel files from command lines, you can't run this command.

But you can run CHKDSK, which is an advanced built-in error checker of Windows to check and repair hard disks. If a file system problem on the disk is causing the Excel file to fail to open, you can try the following command line to fix the error.

Step 1. Open the Search box, and type in CMD. Don't forget to right-click the Command Prompt and choose "Run as administrator".

Step 2. Type CHKDSK F: ?f ?r ?x (you should replace ? with a slash), hit Enter. You can replace F with your drive letter (Where you store your Excel files).