original_docstring: 
    Exception report spreadsheet output format same as input format and
    assumes first column is of type Date - adds an extra, last column
    for error message.
    
docstring: Exception report spreadsheet output format same as input format and
  assumes first column is of type Date - adds an extra, last column
  for error message.
docstring_tokens: Exception report spreadsheet output format same as input format and assumes first column is of type Date - adds an extra last column for error message .
code: def writeErrorRec(record):
    """
    Exception report spreadsheet output format same as input format and
    assumes first column is of type Date - adds an extra, last column
    for error message.
    """
    dateFmt = XFStyle()
    dateFmt.num_format_str='MM-DD-YYYY'
    defaultFmt = XFStyle()
    global erroutRow
  
    for colnum in range(0, len(headers)):
      erroutSheet.write(erroutRow, colnum, record[headers[colnum][0]], 
      tern(headers[colnum][0]==xlrd.XL_CELL_DATE, dateFmt, defaultFmt))
                                       
    # add extra column for error message                                    
    erroutSheet.row(erroutRow).write(len(headers), record['Error'])  
    
    erroutRow += 1
    
    # flush every 200 rows...
    #if ((erroutRow % 200) + 1 == 200):
    # since, xlwt uses aggressive caching, we must
    # write each row manually, or the data may be lost upon exception
    erroutSheet.flush_row_data()  
    errorsWorkbook.save('errors.xls')
code_tokens: def writeErrorRec ( record ) : dateFmt = XFStyle ( ) dateFmt . num_format_str = 'MM-DD-YYYY' defaultFmt = XFStyle ( ) global erroutRow for colnum in range ( 0 , len ( headers ) ) : erroutSheet . write ( erroutRow , colnum , record [ headers [ colnum ] [ 0 ] ] , tern ( headers [ colnum ] [ 0 ] == xlrd . XL_CELL_DATE , dateFmt , defaultFmt ) ) erroutSheet . row ( erroutRow ) . write ( len ( headers ) , record [ 'Error' ] ) erroutRow += 1 erroutSheet . flush_row_data ( ) errorsWorkbook . save ( 'errors.xls' )
short_docstring: Exception report spreadsheet output format same as input format and
  assumes first column is of type Date - adds an extra, last column
  for error message.
short_docstring_tokens: Exception report spreadsheet output format same as input format and assumes first column is of type Date - adds an extra last column for error message .
comment: """
    Exception report spreadsheet output format same as input format and
    assumes first column is of type Date - adds an extra, last column
    for error message.
    """$SEP$# add extra column for error message                                    $SEP$# flush every 200 rows...$SEP$#if ((erroutRow % 200) + 1 == 200):$SEP$# since, xlwt uses aggressive caching, we must$SEP$# write each row manually, or the data may be lost upon exception