MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / parse

Method parse

KVCOMM/tools/reader/readers.py:170–182  ·  view source on GitHub ↗
(self, file_path: Path)

Source from the content-addressed store, hash-verified

168
169class ExcelReader(Reader):
170 def parse(self, file_path: Path) -> str:
171 logger.info(f"Reading Excel file from {file_path}.")
172 try:
173 excel_data = pd.read_excel(file_path, sheet_name=None)
174
175 all_sheets_text = []
176 for sheet_name, data in excel_data.items():
177 all_sheets_text.append(f"Sheet Name: {sheet_name}\n{data.to_string()}\n")
178
179 return "\n".join(all_sheets_text)
180 except Exception as e:
181 logger.info(f"Error reading Excel file: {e}")
182 return "Error reading Excel file."
183
184class XLSXReader(Reader):
185 def parse(self, file_path: Path) -> str:

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected