MCPcopy Create free account
hub / github.com/daniel2005d/mapXplore / _read_excel

Method _read_excel

lib/file_reader.py:63–78  ·  view source on GitHub ↗
(self, content:bytearray)

Source from the content-addressed store, hash-verified

61 return text
62
63 def _read_excel(self, content:bytearray)->str:
64 xlsx = BytesIO(content)
65 wb = load_workbook(xlsx)
66 ws = wb.active
67 text = ''
68
69 for row in ws.iter_rows(values_only=True):
70 for cell in row:
71 if cell is not None:
72 text += str(cell) + ','
73
74 if len([v for v in row if v is not None])>0:
75 text+='\n'
76
77
78 return text
79
80 def _read_ppt(self, content:bytes)->str:
81 text=""

Callers 1

get_officeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected