def prepare_results_for_download(pageData):
    """
    Return a list of search results in a format easily transformable
    to CSV/XLSX.
    """
    result = []
    for page in pageData:
        for sent in pageData[page]:
            if not sent['toggled_off']:
                result.append([sent['header_csv']] + sent['highlighted_text_csv'])
    return result