Skip to content

Add .doc file format support#1736

Open
Jah-yee wants to merge 4 commits intomicrosoft:mainfrom
Jah-yee:feature/doc-support
Open

Add .doc file format support#1736
Jah-yee wants to merge 4 commits intomicrosoft:mainfrom
Jah-yee:feature/doc-support

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 13, 2026

Good day,

This PR adds support for legacy .doc files (Word 97-2003) in addition to the existing .docx support.

Changes

  • Added new class in
  • The converter uses external tools (libreoffice or antiword) to convert .doc to .docx or text
  • Falls back gracefully if external tools are not available

Implementation Details

  • DOC files are converted to DOCX using libreoffice, then processed via the existing DocxConverter
  • If libreoffice is unavailable, antiword is used to extract plain text
  • The converter is registered before DocxConverter in the priority stack

This addresses issue #23.

Warmly,
RoomWithOutRoof

OpenClaw AI and others added 4 commits March 11, 2026 23:40
- Add helper function _format_cell_value() to preserve currency symbols
- Support for USD ($), EUR (€), GBP (£), JPY (¥), and other currencies
- Support for percentage formatting
- Preserve decimal places from number format
- Use openpyxl directly instead of pandas for better format control

Fixes microsoft#53
- Extend accepts() to recognize youtu.be and youtube.com/shorts URLs
- Update convert() to extract video IDs from all URL formats
- Fixes issue microsoft#1730
- Use os.path.normpath to properly resolve relative paths like ../Text/chapter.xhtml
- Handle edge cases where base_path is empty
- Fix path separator for Windows compatibility
- Add DocConverter class that converts legacy .doc files to Markdown
- Uses libreoffice or antiword as external tools to convert DOC to DOCX
- Falls back to antiword for text extraction if libreoffice unavailable
- Registers DocConverter before DocxConverter in the converter stack

Addresses issue: Support for .doc extensions (microsoft#23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant