Can I disable openpyxl from automatically parsing strings to datetime?

Viewed 1032

I'm having simple excel files with various timstamp formats written as strings.
There is a build in feature in openpyxl to automatically convert what seems like a date to a datetime object.

My question is simple, how can I take the raw string as it was inserted to the excel file by the user, without intervention of openpyxl.

I want to do my own format testings using a function that tries various calls to datetime.strptime myself.

Loading the excel is done by me like this:

import openpyxl
ex = openpyxl.load_workbook('/path/to/file.xls')
worksheet = ex.active

In case needing to iterate over rows I'm using worksheet.iter_rows method

1 Answers
Related