mirror of
https://github.com/pretix/pretix.git
synced 2026-08-17 11:56:27 +00:00
Compatibility of safe_openpyxl with openpyxl==3.1.3
This commit is contained in:
@@ -72,9 +72,13 @@ def remove_invalid_excel_chars(val):
|
|||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
||||||
def SafeCell(*args, value=None, **kwargs):
|
def SafeCell(worksheet, row=None, column=None, value=None, **kwargs):
|
||||||
value = remove_invalid_excel_chars(value)
|
value = remove_invalid_excel_chars(value)
|
||||||
c = Cell(*args, value=value, **kwargs)
|
if not column:
|
||||||
|
column = 1
|
||||||
|
if not row:
|
||||||
|
row = 1
|
||||||
|
c = Cell(worksheet, row=row, column=column, value=value, **kwargs)
|
||||||
if c.data_type == TYPE_FORMULA:
|
if c.data_type == TYPE_FORMULA:
|
||||||
c.data_type = TYPE_STRING
|
c.data_type = TYPE_STRING
|
||||||
return c
|
return c
|
||||||
|
|||||||
Reference in New Issue
Block a user