Browse files

Augmenting the fix for github issue 2. Needs to be done on 0.7 branch…

… also.
  • Loading branch information...
1 parent 3f7551e commit fc8f516a0b0ea65163500c4bbce5f64c2f604849 @sjmachin sjmachin committed Apr 15, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 xlrd/
@@ -2093,6 +2093,9 @@ def cellnameabs(rowx, colx, r1c1=0):
def cellnamerel(rowx, colx, rowxrel, colxrel, browx=None, bcolx=None, r1c1=0):
if not rowxrel and not colxrel:
return cellnameabs(rowx, colx, r1c1)
+ if (rowxrel and browx is None) or (colxrel and bcolx is None):
+ # must flip the whole cell into R1C1 mode
+ r1c1 = True
c = colnamerel(colx, colxrel, bcolx, r1c1)
r = rownamerel(rowx, rowxrel, browx, r1c1)
if r1c1:
@@ -2119,6 +2122,10 @@ def rangename2d(rlo, rhi, clo, chi, r1c1=0):
return "%s:%s" % (cellnameabs(rlo, clo, r1c1), cellnameabs(rhi-1, chi-1, r1c1))
def rangename2drel((rlo, rhi, clo, chi), (rlorel, rhirel, clorel, chirel), browx=None, bcolx=None, r1c1=0):
+ if (rlorel or rhirel) and browx is None:
+ r1c1 = True
+ if (clorel or chirel) and bcolx is None:
+ r1c1 = True
return "%s:%s" % (
cellnamerel(rlo, clo, rlorel, clorel, browx, bcolx, r1c1),
cellnamerel(rhi-1, chi-1, rhirel, chirel, browx, bcolx, r1c1)

2 comments on commit fc8f516


sjmachin replied Apr 15, 2012

The title should refer to issue #3, not #2. How does one edit a commit title?


cjw296 replied Apr 15, 2012

One does not simply alter history ;-) This comment will suffice...
(seriously, you can't with Git without making much more trouble...)

Please sign in to comment.