GithubHelp home page GithubHelp logo

Comments (8)

feichao93 avatar feichao93 commented on May 3, 2024
  • 单元格合并,已完成
  • excel sheet 标题,这个会加上的
  • 单元格宽度和高度,这个受到的 社区版 sheetjs限制,暂时无法添加
  • 单元格样式支持……… 待定
    • exceljs 看起来也挺不错的,可以考虑添加对 exceljs 的支持
    • exportTableAsExcel(require('exceljs'), dataSource, columns, optionsOrFilename)

如果有更多的需求可以列出来...

from ali-react-table.

JiangWeian avatar JiangWeian commented on May 3, 2024

@shinima ,如果要将表示导出成excel表格,需要怎么调用代码?

from ali-react-table.

feichao93 avatar feichao93 commented on May 3, 2024

@JiangWeian 目前可以使用这个 API 来将表格内容导出到 excel 文件

https://ali-react-table.js.org/docs/tools/utils#exporttableasexcel

from ali-react-table.

JiangWeian avatar JiangWeian commented on May 3, 2024

@shinima , 有报错, TypeError: Cannot read property 'aoa_to_sheet' of undefined.
调试跟踪发现是const sheet = xlsxPackage.utils.aoa_to_sheet([]);
这一句出错, xlsxPackage.utils是undefined
对exceljs的版本有要求吗?

from ali-react-table.

feichao93 avatar feichao93 commented on May 3, 2024

@JiangWeian 需要用 xlsx

from ali-react-table.

JiangWeian avatar JiangWeian commented on May 3, 2024

@shinima , exportTableAsExcel.d.ts 文件中有一行
import type XLSX_NS from 'xlsx';
能否把type去掉? TS解析不了啊

from ali-react-table.

feichao93 avatar feichao93 commented on May 3, 2024

@JiangWeian 这个是 TS3.8 的新特性,可以确保 xlsx 不会打包进来(如果你不使用的话 exportTableAsExcel)。

这个会导致你编译失败么?是不是可以考虑加上 skipLibCheck 的选项

from ali-react-table.

JiangWeian avatar JiangWeian commented on May 3, 2024

@shinima , 设置skipLibCheck 选项也不行,我将TS升级到3.9.7版本可以解析了

from ali-react-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.