本帖最后由 shero 于 2024-7-31 12:02 编辑
- const res = await fetch('http://127.0.0.1:8080/test.xlsx', {
- method: 'GET',
- });
- if (res.ok) {
- const spread = designerRef.current.designer.getWorkbook();
- const resBlob = await res.blob();
- let blob = new Blob([resBlob], {
- type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- });
- spread.import(blob);
- const sheet = spread.getActiveSheet();
- setSheetName(sheet.name());
- changeSheetTab(spread);
- }
复制代码 此代码获取不到sheetName,应该如何修改 |
|