def _read_xl(self):
# open the work book
wb=xlrd.open_workbook('testfile.xls')
#open the sheet you want to read its cells
sht=wb.sheet_by_index(0)
# this loop will print values for 2nd column and all the rows in the file.
for r in range(sht.nrows):
cell_col1=sht.cell(rowx=r,colx=1).value
print cell_col1
return {}--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To post to this group, send an email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-excel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/python-excel?hl=en-GB.
I have an input excel file, which contains cells with some data like
"+CME ERROR: “SIM not inserted” or error 10. (Based on CMEE=2 or 1)".
When i try to read this module using xlrd module, the string is read
as unicode string and i get string with value
u'+CME ERROR: \u201cSIM not inserted\u201d or error 10. (Based on
CMEE=2 or 1)'
This is due to special charactors and other formula symbols like +, :
=.
How can i read exact string from the cell.