def compareTableData(table1, table2, excludes=None):
  """
  Compares the data in the tables.
  :param Table table1, table2:
  :param list-of-int excludes: column indicies excluded from the comparison
  :return bool: True if comparison matches
  """
  if excludes is None:
    excludes = []
  if table1.numColumns() != table2.numColumns():
    return False
  for idx in range(table1.numColumns()):
    if not idx in excludes:
      data1 = table1.getColumns()[idx].getCells()
      data2 = table2.getColumns()[idx].getCells()
      if data1 != data2:
        return False
  return True