IfcCsv - Can you define datatypes to spreadsheet columns?
When I export classification.ItemReference with IFCCSV the classifications are not recoqnized as string but as integers. Is it possible to define the datatype for a certain column?
At the moment I'm really struggling with the formatting syntax of the Spreadsheet Import/Export. I've been using this site as a reference. https://docs.ifcopenshell.org/ifcopenshell-python/selector_syntax.html
Tagged:
Comments
@chachi_ws
please show the query you used to produce the csv if possible
in case of classification to have Identification and Description I would use
Doesn't work for me, 'classification.Itemreference' does.


But I'm more curious in how ItemReference is summed while it's an IfcIdentifier (string).
@chachi_ws
in my example I used Uniclass, not sure what's yours, sorry
do you want to sum quantity based on element's classification?
@steverugi , mine is NL-SfB Table 1. It's a Dutch classification system.

I don't think the classification system matters in this case, the data is both stored as an IfcClassificationReference. What I find curious is that the column 'ItemReference' is summed, althought it's string data in the IFC (datatype = IfcIdentifier). Is it possible to set the datatype when using IfcCsv?
OK
The two rows on top of the csv table via browser only work as filter or sum to help visualisation of the data in each columns.
Did you try to export it as .csv or .xlsx file? (Not as web)
I'm not aware of a syntax to set the type of a column, if I needed it could be done after export, right?
Yes, I exported to different formats. It is possible with Excel to change the datatype, but I used to set an encoding for a csv export, like Utf-8 or cp1252. The encoding type affects how the csv is read in for instance Excel or LibreOffice. I'll keep on testing.
@steverugi thanks for the quick replies.
did you check the python script option?
I sometimes use python/pandas when required, I have limited programming skills but the results are good enough for what I need
To be honest I have not looked at the encoding options for IfcCsv. I do know that the CSV package from Python itself has options for exporting with encoding.

On the other hand I did find the solution for my 'Dot decimal problem' with numbers. Exported CSV's standard have a Dot as decimal delimiter which causes problems in Excel. With the solution in the picture you can change the Dot into a Comma.