Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Read from Excel into Python

Hi friends,

I am trying to set up Python to read the "Branch ID" that I have typed into an Excel sheet. Let's say that my branch ID is R3, and I have simply typed R3 as it is in the Excel cell, without quotes or whatever.

Python reads it like [u'R3'].

I am using excelpy (book.get_range), not xlrd, but I remember having had this problem before with XLRD too.

I want Python to read it like ["R3"], I mean, I want it to read it as a string.

Please, does anyone know how to get rid of the u character ?

Thanks,

Andre

Read from Excel into Python

Hi friends,

I am trying to set up Python to read the "Branch ID" that I have typed into an Excel sheet. Let's say that my branch ID is R3, and I have simply typed R3 as it is in the Excel cell, without quotes or whatever.

Python reads it like [u'R3'].

I am using excelpy (book.get_range), not xlrd, but I remember having had this problem before with XLRD too.

I want Python to read it like ["R3"], I mean, I want it to read it as a string.

Please, does anyone know how to get rid of the u character ?

Thanks,

Andre

P.S. I think I got the answer myself, I have converted the entire array to string and the u disappeared, thanks !