I am trying to set a data type for a cell in CLosedXML, however the answers I have found about my problem all rely on Cell.SetDataType(x)
or Cell.DataType = x
and both of them seem to be impossible for me for some reason.
Some pages with answers I found:
https://codingjump.com/posts/closedxml-openxml-setting-data-type-for-cell
How to set a data type for a column with ClosedXML?
https://github.com/ClosedXML/ClosedXML/wiki/Data-Types
And ALL OF THEM answer as if my problem does not exist for them.
Whenever I attempt to call Cell.SetDatatype(XLDataType.Text)
I get the following error:
Error CS1061 'IXLCell' does not contain a definition for 'SetDataType' and no accessible extension method 'SetDataType' accepting a first argument of type 'IXLCell' could be found (are you missing a using directive or an assembly reference?)
And whenever I attempt to use Cell.DataType = XLDataType.Text
I get this:
Error CS0200 Property or indexer 'IXLCell.DataType' cannot be assigned to -- it is read only
How would I set a cell's data type if it is read only?