Open nachoalonsoportillo opened 6 months ago
Fix defect reported via Export to excel more than 26 columns error "string index out of range Code: 0"
string.ascii_uppercase produces an array of 26 characters. Trying to reference anything beyond that, throws the error reported.
The write() method supports two forms of notation to designate the position of cells: row-column notations and A1 notation. My suggestion is that
self._worksheet.write(string.ascii_uppercase[index] + '1', column.column_name, bold)
is changed to:
self._worksheet.write(0, index, column.column_name, bold)
Fix defect reported via Export to excel more than 26 columns error "string index out of range Code: 0"
string.ascii_uppercase produces an array of 26 characters. Trying to reference anything beyond that, throws the error reported.
The write() method supports two forms of notation to designate the position of cells: row-column notations and A1 notation. My suggestion is that
self._worksheet.write(string.ascii_uppercase[index] + '1', column.column_name, bold)
is changed to:
self._worksheet.write(0, index, column.column_name, bold)