Skip to content

Commit

Permalink
Smartify
Browse files Browse the repository at this point in the history
  • Loading branch information
ostefano committed Aug 16, 2024
1 parent 1f4b3b1 commit b507d95
Show file tree
Hide file tree
Showing 3 changed files with 252 additions and 75 deletions.
6 changes: 5 additions & 1 deletion misp_modules/modules/expansion/ods_enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ def handler(q=False):
try:
for i in range(0, num_sheets):
rows = pandas_ods_reader.parsers.ods.get_rows(doc, i)
ods = pandas_ods_reader.algo.read_data(pandas_ods_reader.parsers.ods, ods_file, i, headers=False)
try:
ods = pandas_ods_reader.algo.parse_data(pandas_ods_reader.parsers.ods, rows, headers=False, columns=[], skiprows=0)
ods = pandas_ods_reader.utils.sanitize_df(ods)
except AttributeError:
ods = pandas_ods_reader.algo.read_data(pandas_ods_reader.parsers.ods, ods_file, i, headers=False)
ods_content = ods_content + "\n" + ods.to_string(max_rows=None)
return {'results': [{'types': ['freetext'], 'values': ods_content, 'comment': ".ods-to-text from file " + filename},
{'types': ['text'], 'values': ods_content, 'comment': ".ods-to-text from file " + filename}]}
Expand Down
Loading

0 comments on commit b507d95

Please sign in to comment.