Question: “I have a corrupted Microsoft Excel Macro-Enabled Workbook .xlsm file. How can I recover it?”
Please provide the English content you want to translate, and I'll promptly translate it into Chinese for you.
When you try to open a workbook, if you receive one of the following errors (there are many variations), the workbook is corrupt:
How Does an Excel File Get Corrupted?
Can't open your Excel workbook due to a corrupted file? How does an Excel file get corrupted? Can you recover a corrupted Excel file on Windows 10?
Even if the file opens correctly in Excel, the data/formulas/macros stored in the workbook could be corrupted. In this article, we'll mainly focus on repairing a macro-enabled Excel file that encounters corruption issues.
* This macro works in Excel for Microsoft 365, Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel 2007.
If you have a task that you perform repeatedly in Microsoft Excel, you can record a macro to automate the task. A macro is a command, or series of commands, that you can run any number of times. When you create a macro, Excel records your mouse clicks and keystrokes. After you create a macro, you can edit it to fine-tune how it works.
For example, suppose you create a report for the accounting manager each month, and you want to highlight the names of customers with past-due accounts in red, bold type. You could create and run a macro to apply those formats quickly to the selected cells.
In Excel 2007 or later, when you create a workbook with macros enabled, the file extension changes from .xlsx to .xlsm. In short, these files are essentially the same, except that an .xlsm file will execute embedded macros written in the Visual Basic for Applications (VBA) language.
Should macros be enabled in your day-to-day work? It depends. Given the significant security risks that can result from unexpected macros, Microsoft recommends that users avoid enabling macros in Office files unless they understand what the macro does and require the functionality that the file provides with macros enabled.
When Microsoft Excel detects that a file is corrupted while opening it, it attempts to fix the issue. Minor problems are usually automatically corrected the next time you open the file in Excel. However, this isn't always successful, and for severely corrupted files, you'll need to troubleshoot further.
As mentioned earlier, macro-enabled files are XLSM files, while regular Excel files are XLSX (starting from Microsoft Excel 2007) and XLS (earlier versions like Excel 2003). The process of repairing a corrupted macro-enabled Excel file is similar to handling a damaged XLSX or XLS file. Usually, the five methods below are particularly useful for recovering a corrupted XLSM workbook in Windows 10, 8.1, 8, and 7.
The next two options are "Repair" and "Extract Data." You can choose either one based on your needs:
This method recovers data only from damaged Excel files with macros enabled, not formulas and calculated values in the workbook.
Trying to open a corrupted Excel file in Word might help, but only to a limited extent. In Word, you need to have the Microsoft Office Excel Converter installed, and your program will not be able to recover in that environment. Therefore, for a corrupted Excel file with macros, Wordpad would be a better choice than Word.
If Wordpad opens your Excel file enabling macros, you can restore important data and VBA procedures (macros) stored in the file by simply searching for Sub and Function in the recovered text.
If after trying these methods you are able to recover the data but not the macros, read on for one last hail-Mary attempt at recovering the macros.
Indeed, only preventive measures can ensure the safety of our painstakingly created Excel workbooks. Efforts to back up or save auto-recovery copies are not just to prevent file corruption but also loss! Your crucial file may become inaccessible not only due to corruption but also because it was accidentally deleted, the disk was formatted, a virus attacked, or the transfer was interrupted….
So, it's crucial to keep your Big Data files safe. Aside from knowing the five ways on how to deal with corrupted files whether macros are enabled or disabled, you also need to find a reliable and powerful Excel file recovery tool to restore lost, deleted, or unsaved Excel files.
The Data Recovery Wizard, the best free data recovery software recommended by top website reviewers, is your first choice when you suffer data loss, whether it's documents, images, videos, emails or any other types of files. Data Recovery Software.
Step 1: Choose a location and click "Scan"
Select the disk or a specific folder on your Desktop where the lost Excel file was located, and then click on the “Scan” button.
Step 2: Locate your Excel file
To quickly find your Excel files from the scan results, click “Documents” on the left panel. Choose “Excel” and then click “Preview” to check if the Excel files are correct.
Step 3: Recover Excel Files
Finally, select the required Excel file and click on the “Recover” button. After that, choose a folder to save the Excel file at another location.