JSFiddle - React, Tailwind, and code Playground
by Muthuraman B
HTML
<textarea placeholder="paste the base64 data here, exclude readable headers" id='base64input' type="textarea"></textarea>
<br>
<input onclick="saveAsXlsxFile()" type="button" value="update content of link"/>
JavaScript
function saveAsXlsxFile(){
var mediaType="data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,";
var userInp = document.getElementById('base64input');
var a = document.createElement('a');
a.href = mediaType+userInp.value;
//a.href = mediaType+userInp;
a.download = 'filename.xlsx';
a.textContent = 'Download file!';
document.body.appendChild(a);
}