I’m using xlwings to read an Excel sheet into a pandas DataFrame with the built-in pd.DataFrame converter. Some of my columns contain mixed data (e.g. IDs or codes like 123, 00123, ABCD). When I read the sheet, xlwings converts all numeric cells to floats (123 → 123.0), which I want to avoid.
df = sht.range("A1").expand().options(pd.DataFrame, header=1, index=False).value
I would like only specific columns to be treated as text/strings — similar to using dtype={'col': str} in pandas.read_excel — while leaving the other columns default.
Is there a way to specify column-specific converters or options when using .options(pd.DataFrame, ...) in xlwings, so that I can prevent only selected columns from being read as floats?
If not, what’s the recommended pattern for handling this (e.g., reading the full DataFrame once and re-reading specific columns as pd.Series with custom numbers= converters)?
pandas.read_excel?