def write_blank(*args)
    # Check for a cell reference in A1 notation and substitute row and column
    args = row_col_notation(args)

    # Check the number of args
    return -1 if args.size < 2

    # Don't write a blank cell unless it has a format
    return 0 unless args[2]

    row, col, format = args

    # Check that row and col are valid and store max and min values
    return -2 unless check_dimensions(row, col) == 0

    xf = xf_record_index(row, col, format)   # The cell format

    record  = 0x0201                         # Record identifier
    length  = 0x0006                         # Number of bytes to follow
    header    = [record, length].pack('vv')
    data      = [row, col, xf].pack('vvv')

    # Store the data or write immediately depending    on the compatibility mode.
    store_with_compatibility(row, col, header + data)

    0
  end
def write_blank(*args)
    # Check for a cell reference in A1 notation and substitute row and column
    args = row_col_notation(args)

    # Check the number of args
    return -1 if args.size < 2

    # Don't write a blank cell unless it has a format
    return 0 unless args[2]

    row, col, format = args

    # Check that row and col are valid and store max and min values
    return -2 unless check_dimensions(row, col) == 0

    xf = xf_record_index(row, col, format)   # The cell format

    record  = 0x0201                         # Record identifier
    length  = 0x0006                         # Number of bytes to follow
    header    = [record, length].pack('vv')
    data      = [row, col, xf].pack('vvv')

    # Store the data or write immediately depending    on the compatibility mode.
    store_with_compatibility(row, col, header + data)

    0
  end
:call-seq:
   write_blank(row, col   , format)  -> Fixnum
   write_blank(A1_notation, format)  -> Fixnum

 Write a blank cell to the specified row and column (zero indexed).
 A blank cell is used to specify formatting without adding a string
 or a number.

 A blank cell without a format serves no purpose. Therefore, we don't write
 a BLANK record unless a format is specified. This is mainly an optimisation
 for the write_row() and write_col() methods.

 Returns  0 : normal termination (including no format)
         -1 : insufficient number of arguments
         -2 : row or column out of range

This method is used to add formatting to a cell which doesn't contain a
 string or number value.

 Excel differentiates between an "Empty" cell and a "Blank" cell. An
 "Empty" cell is a cell which doesn't contain data whilst a "Blank" cell
 is a cell which doesn't contain data but does contain formatting. Excel
 stores "Blank" cells but ignores "Empty" cells.

 As such, if you write an empty cell without formatting it is ignored:

    worksheet.write('A1',  nil, format)  # write_blank()
    worksheet.write('A2',  nil        )  # Ignored

 This seemingly uninteresting fact means that you can write arrays of data
 without special treatment for undef or empty string values.

 See the note about "Cell notation".