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

Method parse

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

Source from the content-addressed store, hash-verified

183
184class XLSXReader(Reader):
185 def parse(self, file_path: Path) -> str:
186 logger.info(f"Reading XLSX file from {file_path}.")
187 workbook = openpyxl.load_workbook(file_path, data_only=True)
188 text = ""
189
190 for sheet in workbook:
191 text += f"\nSheet: {sheet.title}\n"
192 for row in sheet.iter_rows(values_only=True):
193 row_data = [str(cell) if cell is not None else "" for cell in row]
194 text += "\t".join(row_data) + "\n"
195
196 return text
197
198class ZipReader(Reader):
199 def parse(self, file_path: Path) -> str:

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected