如何使用react-excel-workbook在单个工作表中插入多个工作表数据集?

时间:2018-08-01 10:56:32

标签: javascript excel reactjs react-redux

Document Link

<Workbook filename="ReportData.xlsx" element={<button className="btn btn-primary btn-round btn-simple float-right hidden-xs m-l-10"> Export </button>}>

        <Workbook.Sheet data={joborderlist} name="Job Orders">
        <Workbook.Column label="Booking Ref. No" value="bookingRefNo" />
        </Workbook.Sheet>

        <Workbook.Sheet data={joborderhaulierdata} name="Job Orders Haulier Data">
        <Workbook.Column label="Haulier Email" value="email" />
        <Workbook.Column label="Haulier Code" value="haulierCode" />
        </Workbook.Sheet>

        <Workbook.Sheet data={jobordershipperdata} name="Job Orders Shipper Data">
        <Workbook.Column label="Shipper Name" value="shipperName" />
        <Workbook.Column label="Shipper Email" value="shipperMailId" />
        </Workbook.Sheet>

 </Workbook>

我正在使用React Workbook组件将数据导出到excel。我正在跟踪react-excel-workbook的文档链接。

通过代码,我将数据集分为多张表,如何将所有数据集合并到一张表中。

enter image description here

谢谢。

0 个答案:

没有答案