{"record":{"id":"be7f69641ac83b86","repo":"microsoft/markitdown","slug":"converter-recognized-the-input-as-a-potential-e-be7f69","errorCode":null,"errorMessage":"{converter} recognized the input as a potential {extension} file, but the dependencies needed to read {extension} files have not been installed. To resolve this error, include the optional dependency [{feature}] or [all] when installing MarkItDown. For example:\n\n* pip install 'markitdown[{feature}]'\n* pip install 'markitdown[all]'\n* pip install 'markitdown[{feature}, ...]'\n* etc.","messagePattern":"(.+?) recognized the input as a potential (.+?) file, but the dependencies needed to read (.+?) files have not been installed\\. To resolve this error, include the optional dependency \\[(.+?)\\] or \\[all\\] when installing MarkItDown\\. For example:\n\n\\* pip install 'markitdown\\[(.+?)\\]'\n\\* pip install 'markitdown\\[all\\]'\n\\* pip install 'markitdown\\[(.+?), \\.\\.\\.\\]'\n\\* etc\\.","errorType":"exception","errorClass":"MissingDependencyException","httpStatus":null,"severity":"error","filePath":"packages/markitdown/src/markitdown/converters/_xlsx_converter.py","lineNumber":71,"sourceCode":"\n        if extension in ACCEPTED_XLSX_FILE_EXTENSIONS:\n            return True\n\n        for prefix in ACCEPTED_XLSX_MIME_TYPE_PREFIXES:\n            if mimetype.startswith(prefix):\n                return True\n\n        return False\n\n    def convert(\n        self,\n        file_stream: BinaryIO,\n        stream_info: StreamInfo,\n        **kwargs: Any,  # Options to pass to the converter\n    ) -> DocumentConverterResult:\n        # Check the dependencies\n        if _xlsx_dependency_exc_info is not None:\n            raise MissingDependencyException(\n                MISSING_DEPENDENCY_MESSAGE.format(\n                    converter=type(self).__name__,\n                    extension=\".xlsx\",\n                    feature=\"xlsx\",\n                )\n            ) from _xlsx_dependency_exc_info[\n                1\n            ].with_traceback(  # type: ignore[union-attr]\n                _xlsx_dependency_exc_info[2]\n            )\n\n        sheets = pd.read_excel(file_stream, sheet_name=None, engine=\"openpyxl\")\n        md_content = \"\"\n        for s in sheets:\n            md_content += f\"## {s}\\n\"\n            html_content = sheets[s].to_html(index=False)\n            md_content += (\n                self._html_converter.convert_string(","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/microsoft/markitdown/blob/fd239d5d2be43d9b68329730206b9312c7d5a388/packages/markitdown/src/markitdown/converters/_xlsx_converter.py#L53-L89","documentation":"XlsxConverter raises MissingDependencyException when convert() runs but the import of openpyxl/pandas for .xlsx handling failed at module load (_xlsx_dependency_exc_info). accepts() matched .xlsx extension or the xlsx mimetype, then the guard fires with instructions to install the [xlsx] extra. Note the sibling .xls converter in the same file has its own separate guard and xlrd dependency.","triggerScenarios":"Calling convert() on a stream with extension .xlsx or mimetype application/vnd.openxmlformats-officedocument.spreadsheetml.sheet when markitdown lacks the [xlsx] extra; or openpyxl/pandas import failure (pandas ABI mismatch after a Python upgrade, corrupted wheels).","commonSituations":"Spreadsheet-ingestion services on base markitdown; environments where pandas was compiled for a different Python minor version and now raises ImportError; slim Docker images omitting extras to reduce size.","solutions":["Install the extra: pip install 'markitdown[xlsx]'","Or: pip install 'markitdown[all]'","Verify imports: python -c \"import pandas, openpyxl\"; reinstall (pip install --force-reinstall pandas openpyxl) if it fails","Add markitdown[xlsx] (or [all]) to your application's dependency list so deployments always include it"],"exampleFix":"# before\npip install markitdown\nMarkItDown().convert('budget.xlsx')  # MissingDependencyException\n\n# after\npip install 'markitdown[xlsx]'\nMarkItDown().convert('budget.xlsx')","handlingStrategy":"try-catch","validationCode":"from markitdown.converters._xlsx_converter import _xlsx_dependency_exc_info\n\ndef can_convert_xlsx() -> bool:\n    return _xlsx_dependency_exc_info is None","typeGuard":null,"tryCatchPattern":"from markitdown import MarkItDown, MissingDependencyException\n\ntry:\n    result = MarkItDown().convert(\"sheet.xlsx\")\nexcept MissingDependencyException:\n    logger.error(\"install markitdown[xlsx] to process Excel workbooks\")\n    raise","preventionTips":["Install markitdown[xlsx] wherever spreadsheet ingestion is possible","After Python upgrades, verify `import pandas, openpyxl` still works (ABI breaks)","Prefer markitdown[all] in general-purpose deployments to avoid per-format gaps"],"tags":["dependencies","installation","xlsx","excel","optional-extras"],"backgroundTag":null,"analyzedSha":"fd239d5d2be43d9b68329730206b9312c7d5a388","analyzedAt":"2026-08-14T15:47:51.745Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}