How to extract the contents of Word table to Excel
To organize table contents in Word documents into Excel, you can copy and paste them one by one, or read them in batches using macros or scripts. This article explains the selection basis, operation steps and verification methods after getting the results in various situations.
Key points of this article
- When the number of tables is small, it is easier to copy and paste them into Excel one by one, but you should check whether the cells are misaligned and whether the merged cells are split.
- When there are many files and the table structure is unified, it is suitable to use macros or scripts to read in batches, which is highly efficient, but needs to be verified on a test file first.
- After pasting, check the number of rows, columns and key figures, and keep the source file name of each piece of data for easy retrieval.
- The "Table Text Extraction Tool" executable file of unknown origin has security risks. Before running, the source should be confirmed and checked with anti-virus software.
Many people have a batch of Word documents in their hands, which contain contract quotations, experimental data or statistical tables from survey questionnaires. To summarize the contents of these tables into Excel for screening and calculation, the direct idea is to copy and paste them one by one. However, when there are too many files, it is easy to miss rows and wrong columns. This article talks about the specific tasks of "table content": how to move tables in Word into Excel cells, what to do when there are many files, and how to check after moving.
After reading, you can first judge which approach is suitable for your situation: manually move one or two files, or batch read dozens of files with the same structure using macros or scripts. The article also gives the operation path of OmniDoc, which is to use UniDoc to open the Word file, copy the table, and then paste it into the UniCell spreadsheet in the desktop client.
🎯 Extracting Word tables to Excel, which method is suitable for you? One sentence conclusion
Direct answer: If there are few tables, copy them one by one. If there are many tables and the structures are unified, read them in batches. Time should be set aside for verification in the middle steps. When choosing, it mainly depends on the number of files, whether the table structure is consistent, and whether you can accept the one-time script learning cost.
| your situation | Recommended practices | reason |
|---|---|---|
| Only one or two documents and not many forms | Copy one by one and paste into UniCell or Excel | No additional preparation is required, the results can be seen directly |
| Dozens of documents, headers and column numbers are basically the same | Use macros or scripts to read tables in batches and output them to a summary table | There are few repeated operations, but it must be verified on the test file first. |
| There are a large number of merged cells or multi-layer headers in the table | First manually organize them into standardized tables one by one, and then summarize them. | During automatic reading, the merged cells are easily separated, and the results are not easy to correspond to. |
| The file is actually a PDF or a scan | Convert or OCR first, then extract | Word's copy method may not be effective for PDF tables |
Before you start: Confirm these points first
Taking a few minutes to confirm the following items before starting can save most of the rework.
- Confirm file format. The copy-paste method is for .docx files. If you have a PDF, first confirm whether it is an electronic version with Chinese characters or a scanned copy. Text that can be selected can be processed directly; text that cannot be selected needs to be OCR recognized first, and the recognition results must also be checked.
- Confirm whether the table structure is consistent. The prerequisite for batch processing is that the header and column order of each file are basically the same. If some files in the same batch have one more column and some have one less column, automatic reading will put the data in the wrong position. It is recommended to unify the template first.
- Confirm whether there are merged cells in the table. Merged cells often become blank or have wrong rows after being pasted into Excel. This is a common cause of errors. Take a quick look before doing it.
- Determine the output format. Is there a separate worksheet for each document, or is all data summarized in one overall table? The summary table is easy to filter, but an extra column is needed to indicate the source document, otherwise it cannot be traced later.
- Pay attention to the source and security of files. When searching, you will often see downloads such as "Word table text extraction tool.exe". Executable files of unknown origin may be risky and are not recommended to be run directly. If necessary, use anti-virus software to check first, and only take a non-sensitive test file for trial run.
Steps to copy Word table to UniCell in OmniDoc
This section is suitable for situations where the number of files is small and needs to be processed one by one. OmniDoc currently operates file by file, and the following steps are also written in this way.
- Open app.unidoc.top and upload the Word file to be processed. UniDoc web editor supports Word-compatible editing, where tables in documents can be viewed.
- Find the target table in the editor, put the cursor into the table, select the entire table and copy it.
- Open the desktop client (downloadable from download.omnidoc.top) and create a new UniCell spreadsheet.
- Paste in a blank worksheet in UniCell. After pasting, take a look at the overall structure to confirm that each cell corresponds to a cell in the original table.
- Check the position of the merged cells, fill in the split or blank cells, add a column of "source file" on the left or right side of the table, and fill in the file name.
- Repeat steps 1 to 5 for the next document. It is recommended to use a separate worksheet for each file, or append them in order in the total table, and keep blank lines as separation.
- After everything is completed, if the format saved by UniCell is inconvenient to open directly with Excel, you can copy the table to the desktop office software Excel on your computer, and then save it as an .xlsx file.
Batch reading: a common approach when there are many files
If there are dozens or more files with the same header, copying them one by one will be very time-consuming. At this time, you can consider using a general batch method. There are two common categories:
- Word macros work with Excel. Use VBA in Word to write a loop code that traverses each document in the folder, reads each cell of the first table, and then writes it to an Excel file. This method does not require additional software installation, but does require basic macro editing.
- Script reading. Use Python's document processing library to open .docx files one by one, read table rows and columns, and write an .xlsx file. The script can automatically append the file name after each line for easy tracing.
No matter which method is used, you must first test run it on two or three documents, compare the output with the original table cell by cell, and then run it in full after confirming that it is correct.
Check each item after completion
After getting the results, don’t rush to use them. First go through the form below.
| Check items | How to see | What to do if there is a problem |
|---|---|---|
| Is the number of rows consistent? | Compare the number of rows in the original table with the number of data rows in Excel (remove the header) | Check whether any blank rows have been accidentally deleted or there are too many blank rows, and copy the table again if necessary. |
| Column number and column order | Compare the header of the table column by column and spot check the first and last two columns. | Files with inconsistent structures should be processed separately and should not be mixed into the master table. |
| Merge cells | Find the merged area in the original table and see if the corresponding position in Excel is empty. | Manually fill in the values in the corresponding rows and explain them in the remarks column. |
| Numbers and dates | Spot-check a few amounts, percentages, and dates to see if they become text or are formatted incorrectly | Set cell formats uniformly and review with formulas if necessary |
| Source traceable | Whether each line has a source file name | Supplement the source column to avoid being confused about which document the data comes from later. |
| Machine recognition content | If OCR or automatic conversion, check key figures item by item | Make corrections based on the original document. Do not accept the identification results directly. |
📊 Core comparison
The differences between manual copying, macros and scripts are mainly in the threshold for getting started, single-time efficiency and the difficulty of troubleshooting after errors. The following table compares the three together so that you can make a choice based on your own number of files and technical foundation.
| Contrast Dimensions | Manual copy and paste | Word macros with Excel | Script reading |
|---|---|---|---|
| Threshold to get started | Low, no additional knowledge required | Basic macro editing required | Need to be able to run scripts and basic programming |
| When there are few files | High efficiency, results can be seen directly | Setup costs outweigh benefits | Setup costs outweigh benefits |
| When there are many files | It takes a long time and is easy to miss. | Run in batches to save time | Run in batches, save time and facilitate adding source columns |
| Troubleshooting after errors | Directly compare with the original table to easily find problems | Need to read the code to find the reason | You need to read the code to find the cause and use the output log |
| When the structure is not unified | Can be manually adjusted one by one | Code rules need to be modified | Code rules need to be modified |
Generally speaking, when there are few files, manual copying is preferred, and when there are many files and the structure is unified, macros or scripts are considered. You don’t have to pursue automation from the get-go.
❓ Frequently Asked Questions (FAQ)
1. How to extract text from a document table? Is it okay as long as the text does not require formatting?
Can. When pasting into Excel, choose the paste method that only retains the text content to remove the font and background color. After pasting, you still need to check whether the numbers are treated as text, and adjust the format uniformly if necessary.
2. There are pictures in the table, can they be extracted to Excel together?
Excel cells put text and numbers, pictures don't go into the cells as they are. If there is text in the picture, you need to use a recognition tool to convert it into text before filling it in. The recognition results must also be checked.
3. Is it safe to use "Table Text Extraction Tool.exe" from unknown sources?
It is not recommended to run it directly. Executable files may carry malicious programs and may also read the contents of your files. If you must try it, please confirm the source first, scan it with anti-virus software, and only use test files that do not contain sensitive information.
4. What should I do if the merged cells are misaligned after being pasted into Excel?
First, check the data corresponding to each merged area in Word, and then manually fill in the values into the corresponding rows and columns in Excel. If there are many merged cells, it is recommended to split the table into a standardized structure in Word and then copy it, so that subsequent verification will be much easier.
5. The extracted data needs to be updated regularly. Is there any way?
If the source file changes frequently, it is recommended to fix the extraction steps: unify the header template, use the same method to append to the master table after each update, and retain the source column and date column. This way the scope of each verification is clear.
📝 Summary
To organize the contents of Word tables into Excel, the core is to first determine the number of files and table structure, and then choose to copy them one by one or read them in batches. No matter which method is used, verify it on the test file and check with the number of rows, columns, merge cells, and source columns. The key to batch extracting table contents in Word and storing them in Excel is to unify the structure and fix the process from the beginning.


