我对JS的反应是新的。我试图使用react.js上传Excel表格文件,并将数据显示到表中。我从链接中得到了部分参考,但是,它还没有完成。请帮忙。从excel导入数据并在react组件中显示
发布于 2018-06-28 14:10:58
您可以使用像https://react-dropzone.js.org/这样的库来上传文件,然后使用https://github.com/felixrieseberg/React-Spreadsheet-Component库来显示它。
发布于 2019-02-07 08:30:09
react excel-渲染器
这里有一个完美的图书馆!它首先将excel数据转换为JSON,然后将其呈现为HTML表。它叫react excel-渲染器
npm install react-excel-renderer --saveimport {ExcelRenderer, OutTable} from 'react-excel-renderer';<OutTable data={this.state.rows} columns={this.state.cols} tableClassName="ExcelTable2007" tableHeaderRowClass="heading" />就这样!完事了!
同样的演示程序可以找到这里。
发布于 2018-06-29 19:04:37
https://stackoverflow.com/questions/51084434
复制相似问题