How to Repair Excel from Command Lines (Windows 10/8.1/8/7)

You are going to learn at least three ways to recover and repair Excel from command lines. If you are not familiar with the command lines, you can turn to EaseUS Excel repair software. This tool can recover and repair corrupted Excel files with simple steps.

Table of Contents

When an Excel file or folder is corrupted, you receive a message saying that the .xlsx is corrupted and cannot be opened. Then, your computer could ask if you would like to recover the contents. This error may happen to all kinds o files on the computer, including system files, Word documents, Excel files, and more. To repair corrupted Excel files, you can either use the command lines or third-party software. Follow the solutions below to repair and open Excel from the command line in Windows 10.

repair corrupt excel files using command lines

Solution 1. Run CHKDSK to Repair Excel from Command Lines

If some Windows functions aren't working or Windows crashes, use the System File Checker to scan Windows and restore your files. But the SFC 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. You can perform this check on a drive, directory, or a specific file and fix the error with this command. 

Step 1. Open the Search box, type CMD. Right-click the Command Prompt and choose "Run as administrator".

repair excel from command line - 1

Step 2. Type E: /f /r /x, hit the Enter. You can replace E with your drive letter (Where you store your Excel files).

repair excel from command line - 2

Solution 2. Use CHKDSK Command Line Alternative

If you are not familiar with command lines and want to minimize the risk of data loss, you can turn to the CHKDSK alternative.

If command line is not your ideal choice, you can apply this command-line alternative tool - EaseUS CleanGenius. Use this one-click tool to fix the file system error on your hard drive.

Step 1.  DOWNLOAD EaseUS CleanGenius on your computer for free. 

Step 2. Run the software. Click "Optimization" on the left panel, and then choose "File Showing" . 

select the file showing option

Step 3. Go to "Choose drive" and select the drive with a file system error. Check the "Check and fix file system error" option and click "Execute".

fix file system

Step 4. Wait the EaseUS CleanGenius completes the repairing process. After that, click the "here" to view the result.

fix file system

Solution 3. Repair the Excel File with Data Recovery Software

If the command lines fail to help, you can turn to third-party software. EaseUS hard disk data recovery software for Excel repairs corrupted Excel spreadsheets (.xls, .xla, .xlsx). With it, you can recover Excel 2019, 2016, 2013, 2010, 2007, and more. Besides, this data recovery software has many other highlights:

Follow the steps below to repair and recover corrupted Excel files.

Step 1. Select a location to start finding corrupted Excel files

Launch EaseUS Data Recovery Wizard, and then scan the corrupted or damaged Excel files.

repair Excel file - 1

Step 2.  Scan for the corrupted Excel document

Find the damaged files through the filter, file path, search, etc.

repair damaged Excel files

Step 3.  Repair and save the Excel file to a secure location

Double-click the corrupt excel file, and this program will automatically repair corrupted and damaged Excel files. Click "Recover" to save the repaired Excel files to a safe location.

Save repaired Excel files


This post has provided you with three ways to repair Excel files from command lines. Note that there are possibilities you will lose some of the data since CHDSK will automatically fix the errors. Therefore, EaseUS Excel repair software is my recommendation.

Was This Page Helpful?

Updated by Brithny

Brithny is a technology enthusiast, aiming to make readers' tech life easy and enjoyable. She loves exploring new technologies and writing technical how-to tips. On her spare time, she loves sharing things about her favorite singer - Taylor Swift on her Facebook or Twitter.

Read full bio

Product Reviews

TrustScore 4.7 | 323 reviews
  • EaseUS Data Recovery Wizard is a powerful system recovery software, designed to enable you to recover files you’ve deleted accidentally, potentially lost to malware or an entire hard drive partition.

    Read More
  • EaseUS Data Recovery Wizard is the best we've seen. It's far from perfect, partly because today's advanced disk technology makes data-recovery more difficult than it was with the simpler technology of the past.

    Read More
  • EaseUS Data Recovery Wizard Pro has a reputation as one of the best data recovery software programs on the market. It comes with a selection of advanced features, including partition recovery, formatted drive restoration, and corrupted file repair.

    Read More