Commit 299ff3f
committed
fix: improve Excel parser reliability + add test files
FIXES:
ExcelParser.getMetadata() - Remove bookProps option, add null checks
ExcelParser.getSheetNames() - Remove bookSheets option, add null checks
Better error handling for malformed Excel files
TESTING:
Created comprehensive test suite (test-office-docs.ts)
All Word parser tests passing (4/4)
- Text extraction (710 chars)
- Metadata retrieval
- Text search (5 matches)
- HTML conversion (1451 chars)
All Excel parser tests passing (8/8)
- Metadata with 3 sheets
- JSON/CSV/Text format extraction
- Multi-sheet processing
- Cell-based search
- Number search
TEST FILES:
+ Word测试文件.docx (6 MB) - User provided test document
+ Excel测试文件.xlsx (19 KB) - Auto-generated with 3 sheets:
- 销售数据 (Sales data)
- 员工信息 (Employee info)
- 统计数据 (Statistics)
DEPENDENCIES:
+ xlsx@^0.18.5 (devDependencies for testing)
UPDATED:
- .gitignore (ignore test files)
- ExcelParser reliability improvements
VERIFIED:
Both Word and Excel parsers fully functional!1 parent a767d80 commit 299ff3f
File tree
5 files changed
+19
-8
lines changed- packages/pdf-parser-core/src
5 files changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
70 | | - | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
| 212 | + | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | | - | |
| 299 | + | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments