diff --git a/src/ifccsv/ifccsv.py b/src/ifccsv/ifccsv.py index 17bf28c58d..a4784be867 100755 --- a/src/ifccsv/ifccsv.py +++ b/src/ifccsv/ifccsv.py @@ -129,7 +129,7 @@ class IfcCsv: df = self.export_pd() for col_index, col in enumerate(df.columns): # Assuming the first row of the table contains headers - header_cell = first_table.getElementsByType(TableRow)[0].getElementsByType(TableCell)[col_index] + header_cell = self.get_col(first_table.getElementsByType(TableRow)[0], col_index) self.set_cell_value(header_cell, col) # Replace existing table data with data from DataFrame