ЮЧ
Size: a a a
ЮЧ
A
A
A
fetch('standart.xlsx')
.then((res) => {
return res.arrayBuffer();
})
.then((res) => {
console.log(res instanceof ArrayBuffer);
var data = new Uint8Array(res);
var arr = new Array();
for (var i = 0; i != data.length; ++i) arr[i] = String.fromCharCode(data[i]);
var bstr = arr.join('');
const wb = XLSX.read(bstr, { type: 'array', cellStyles: true });
console.log(wb);
const file = XLSX.write(wb, { type: 'array' });
const blob = new Blob([file], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
FileSaver.saveAs(blob, 'test.xlsx');
});
}A
A
ЮЧ
A
A
axios
.get('/standart.xlsx', { responseType: 'arraybuffer' })
.then((res) => {
return res;
})
.then((res) => {
async function g() {
let data = new Uint8Array(res.data);
var wb = XLSX.read(data, { type: 'array', cellStyles: true }, '-j');
const file = XLSX.write(wb, { type: 'array' });
const blob = new Blob([file], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
FileSaver.saveAs(blob, 'test.xlsx');
}
g();
});
Л
Л
Л
ЮЧ
export { addPost } = actionsA
ЮЧ
A
ЮЧ