'Write a boolean value to a worksheet cell.
Args:
row:         The cell row (zero indexed).
col:         The cell column (zero indexed).
boolean:     Cell data. bool type.
cell_format: An optional cell Format object.
Returns:
0:  Success.
-1: Row or column is out of worksheet bounds.'

@convert_cell_args
def write_boolean(self, row, col, boolean, cell_format=None):

    if self._check_dimensions(row, col):
        return (-1)
    if (self.constant_memory and (row > self.previous_row)):
        self._write_single_row(row)
    if boolean:
        value = 1
    else:
        value = 0
    self.table[row][col] = cell_boolean_tuple(value, cell_format)
    return 0
