Class Introduction
Function
Inherits langchain_core.document_loaders.base.BaseLoader and mx_rag.document.loader.BaseLoader to parse Excel files in .xlsx and .xls formats. Currently, only text can be parsed. Images and combined formats cannot be recognized.
Prototype
from mx_rag.document.loader import ExcelLoader ExcelLoader(file_path, line_sep="**;")
Parameters
Parameter |
Data Type |
Required/Optional |
Description |
|---|---|---|---|
file_path |
String |
Required |
Excel file path. The path length range is [1, 1024]. The path cannot be a soft link and cannot contain two consecutive dots (..). The number of sheets in a single file is less than or equal to 1,000, and the file size is less than or equal to 100 MB. (The size of the decompressed .xlsx file cannot exceed 500 MB.) |
line_sep |
String |
Optional |
User-defined line separator. The default value is **;. The length range is [1, 1024]. |
Example
from mx_rag.document.loader import ExcelLoader
loader = ExcelLoader("test.xlsx")
docs = loader.lazy_load()
print(list(docs))
Parent topic: ExcelLoader