def formula(self, row_abs=False, col_abs=False):
if row_abs and col_abs:<EOL><INDENT>fmt = u'<STR_LIT>'<EOL><DEDENT>elif row_abs:<EOL><INDENT>fmt = u'<STR_LIT>'<EOL><DEDENT>elif col_abs:<EOL><INDENT>fmt = u'<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>fmt = u'<STR_LIT>'<EOL><DEDENT>start = fmt % (_col_name(self.col), _row_name(self.row))<EOL>if self.row_count == self.col_count == <NUM_LIT:1>:<EOL><INDENT>return start<EOL><DEDENT>end = fmt % (_col_name(self.col_end), _row_name(self.row_end))<EOL>return '<STR_LIT>' % (start, end)<EOL>
Returns this address as a string to be used in formulas.