You can get list items using REST API and jQuery and export data to excel, the following code for your reference.
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
function exportToExcel(){
var listName="CustomList";
$.ajax({
url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getByTitle('"+listName+"')/items",
type: "GET",
headers: {
"Accept": "application/json;odata=verbose",
},
success: function (data) {
var htmlTable="<table><thead><tr><th>Title</th></tr></thead><tbody>";
$.each(data.d.results,function(i,item){
htmlTable+="<tr><td>"+item.Title+"</td></tr>";
});
htmlTable+="</tbody></table>"
fnExcelReport(htmlTable);
},
error: function (data) {
alert("Error");
}
});
}
function fnExcelReport(htmlTable) {
var tab_text = htmlTable;
$(tab_text).find("tr td:first-child").remove();
tab_text = tab_text.replace(/<A[^>]*>|<\/A>/g, ""); //remove if u want links in your table
tab_text = tab_text.replace(/<img[^>]*>/gi, ""); // remove if u want images in your table
tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet Explorer
{
txtArea1.document.open("txt/html", "replace");
txtArea1.document.write(tab_text);
txtArea1.document.close();
txtArea1.focus();
sa = txtArea1.document.execCommand("SaveAs", true, "ListItem.xls");
} else //other browser not tested on IE 11
tab_text = excelExportHtml(tab_text, true)
sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
return (sa);
}
</script>
<input type="button" value="Export to Excel" onclick="exportToExcel()"/><iframe id="txtArea1" style="display:none"></iframe>