def generate_report(formulae_occurances, malicious_cells):
    """
    arguments: (1) output from detect_formulae(), (2) output from detect_malicious_cells()
    returns: if needed, a multi-line-string report, otherwise None
    """
    if len(formulae_occurances) > 0:
        report = """There were {} formulae patterns detected.
These will be automatically evaluated by some spreadsheet editors such as Excel, this is a potential risk.
        """.format(len(formulae_occurances))

        if len(malicious_cells) > 0:
            report += """
In addition, several of these formulae cells contained keywords known to occur in malicious contexts;
please verify with the sender why the following cell formulae are required:
{}
        """.format("".join("{}\n".format(mc) for mc in malicious_cells))
        return report
    return None