def has_excel(pubdata):
    """
    sets a display variable so that if there is an excel document, we can display a link to an excel reader
    :param pubdata:
    :return: pubdata
    """
    pubdata['hasExcel'] = False
    if pubdata.get('links') is not None:
        for link in pubdata['links']:
            if link.get('linkFileType', {}).get('text') == 'xlsx':
                pubdata['hasExcel'] = True
    return pubdata