We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 20dcade + 8586c94 commit df539b7Copy full SHA for df539b7
src/fosslight_util/write_excel.py
@@ -34,6 +34,7 @@
34
IDX_EXCLUDE = 7
35
logger = logging.getLogger(LOGGER_NAME)
36
COVER_SHEET_NAME = 'Scanner Info'
37
+MAX_EXCEL_URL_LENGTH = 255
38
39
40
def get_header_row(sheet_name, extended_header={}):
@@ -181,7 +182,10 @@ def write_result_to_sheet(worksheet, sheet_contents):
181
182
for row_item in sheet_contents:
183
worksheet.write(row, 0, row)
184
for col_num, value in enumerate(row_item):
- worksheet.write(row, col_num + 1, str(value))
185
+ if len(value) > MAX_EXCEL_URL_LENGTH and (value.startswith("http://") or value.startswith("https://")):
186
+ worksheet.write_string(row, col_num + 1, str(value))
187
+ else:
188
+ worksheet.write(row, col_num + 1, str(value))
189
row += 1
190
191
0 commit comments