mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fixed #3901
It was throwing an error because was failing to write a list to an excel cell, now it's explicitly converting the value to string.
Python: Traceback (most recent call last):
File "\blenderbim\bim\module\fm\operator.py", line 102, in execute
writer.write_xlsx(filepath)
File "\blenderbim\libs\site\packages\ifcfm\__init__.py", line 259, in write_xlsx
cell = worksheet.cell(row=r, column=c, value=col)
File "\blenderbim\libs\site\packages\openpyxl\worksheet\worksheet.py", line 247, in cell
cell.value = value
File "\blenderbim\libs\site\packages\openpyxl\cell\cell.py", line 218, in value
self._bind_value(value)
File "\blenderbim\libs\site\packages\openpyxl\cell\cell.py", line 187, in _bind_value
raise ValueError("Cannot convert {0!r} to Excel".format(value))
ValueError: Cannot convert ['USE TYPE CATALOG'] to Excel
This commit is contained in:
@@ -256,7 +256,7 @@ class Writer:
|
||||
cell_format = "n"
|
||||
else:
|
||||
cell_format = colours[c - 1] # Adjusted the indexing
|
||||
cell = worksheet.cell(row=r, column=c, value=col)
|
||||
cell = worksheet.cell(row=r, column=c, value=str(col))
|
||||
cell.fill = cell_formats[cell_format]
|
||||
c += 1
|
||||
r += 1
|
||||
|
||||
Reference in New Issue
Block a user