Question: Changing Column Data Type: Excel Import

I want to change the datatype of a column of a Dataframe imported from Excel.

The import succeeds, and I can change the data type of numeric columns (from the default 'anything' to, say, float).

But conversion fails for all string columns. For example:

DataNew := SubsDatatype(Data, "UN Region", string);

throws the following error:

Error, (in DataSeries:-SubsDatatype) in datatype conversion; try using the 'conversion' option for data type string

The column in question has values such as "Southern Asia", which I would have thought would convert.

What am I doing wrong?

Please Wait...