I'm using Openpyxl to iterate over the values of a worksheet column, where there are values like this:
192:45:49
This should be a simple string and considered as such (I need to extract with a re.match() the initial "192"), but Python - as I can see using type(cell.value) - thinks it's a datetime object:
for col_cells in ws.iter_cols(min_col=3, max_col=3):
for cell in col_cells:
print type(cell.value)
type 'datetime.datetime'
I have no control over the initial file, so how can I consider it as a simple string? I find plenty of documentation on how to "convert" datetime objects to strings, but that's not what I'm after.