通过添加标题和一些计算出的数据将两个Excel数据导出到单个Excel工作表中 [英] Export two excel data into single excel sheet by adding heading and some calculated data
问题描述
我正在使用 反应数据导出 在我的React项目中导出Excel工作表.我需要在单个文件中导出两个Excel数据.例子
I am using react-data-export to export the excel sheet in my react project. I need to export two excel data in single file. Example
如果无法使用上述模块,请给我建议一种新的方法.
If not possible the above module please suggest me a new way to do so.
推荐答案
I have published a simple proof of concept that it should be useful to understand how it is possible to satisfy the needs in the question to export two excel data in single file.
In the ExcelSheet
components it is possible to pass a dataSet
that allows any number of data tables and other features such as column headers and the offset in rows and columns between a data table and the subsequent one.
-
ExcelSheet
的data
属性用于一个数据表. -
ExcelSheet
的dataSet
属性用于一个或多个数据表
- The
data
attribute ofExcelSheet
is for one data table. - The
dataSet
attribute ofExcelSheet
is for one or more data table
在 react-data-export git存储库中,还有一个示例未解决问题,其中包含一些我为POC所学的建议.
In the react-data-export git repo there is also an example simple_excel_export_02 but I have not been able to make it work, also there is a open issue with some suggestions I've learned for my POC.
这篇关于通过添加标题和一些计算出的数据将两个Excel数据导出到单个Excel工作表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!