我通过代码导出了一份excel数据,excel中部分单元格我要求需要被禁用(受保护)
顶部不能被禁用,怎么处理?
现在的问题是 导出的excel顶部被禁用了。
以下是导出的参数:
export const spreadExportExcel = async (spread, fileName = 'excel') => {
const option = {
includeBindingSource: true, includeStyles: true, includeFormulas: true, saveAsView: false, rowHeadersAsFrozenColumns: false, columnHeadersAsFrozenRows: false, includeAutoMergedCells: false, includeCalcModelCache: false, includeUnusedNames: true, includeEmptyRegionCells: true, fileType: 0
};
const json = spread.toJSON({ includeBindingSource: true });
const excelIo = new ExcelIO.IO();
await excelIo.save(json, (blob) => {
saveAs('xlsx', blob, fileName);
}, (err) => {
console.log(err);
exportErrorProxy.value = err;
}, option);
};
|