def setHeaderCols(row):
    headerCols.clear()
    for (iCol, colCell) in enumerate(row):
        v = xlValue(colCell)
        if isinstance(v, str):
            v = v.strip()
        if (v in importColHeaderMap):
            for hdr in importColHeaderMap[v]:
                if (hdr in importColumnHeaders):
                    headerCols[importColumnHeaders[hdr]] = iCol
        elif (v in importColumnHeaders):
            headerCols[importColumnHeaders[v]] = iCol
        elif isinstance(v, str):
            if any((v.startswith(r) for r in ('label,', 'labels,', 'reference,', 'references,', 'relationship to,'))):
                m = resourceParsePattern.match(v)
                if m:
                    _resourceType = m.group(1)
                    _resourceRole = ('/' + m.group(2))
                    _resourceLangOrPart = m.group(4)
                    headerCols[(_resourceType, _resourceRole, _resourceLangOrPart)] = iCol
            else:
                headerCols[v] = iCol
def setHeaderCols(row):
    headerCols.clear()
    for (iCol, colCell) in enumerate(row):
        v = xlValue(colCell)
        if isinstance(v, str):
            v = v.strip()
        if (v in importColHeaderMap):
            for hdr in importColHeaderMap[v]:
                if (hdr in importColumnHeaders):
                    headerCols[importColumnHeaders[hdr]] = iCol
        elif (v in importColumnHeaders):
            headerCols[importColumnHeaders[v]] = iCol
        elif isinstance(v, str):
            if any((v.startswith(r) for r in ('label,', 'labels,', 'reference,', 'references,', 'relationship to,'))):
                m = resourceParsePattern.match(v)
                if m:
                    _resourceType = m.group(1)
                    _resourceRole = ('/' + m.group(2))
                    _resourceLangOrPart = m.group(4)
                    headerCols[(_resourceType, _resourceRole, _resourceLangOrPart)] = iCol
            else:
                headerCols[v] = iCol