Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel Export bug #58

Closed
ZiedHf opened this issue Aug 13, 2018 · 5 comments
Closed

Excel Export bug #58

ZiedHf opened this issue Aug 13, 2018 · 5 comments
Assignees
Labels
Bug Item which indicates that something is not working pkg:Grid
Milestone

Comments

@ZiedHf
Copy link

ZiedHf commented Aug 13, 2018

Bug report

  • Exporting Excel file does not works as expected.

Current behavior

  • Looping an array 'columns' inside the exports an empty Excel file.

馃洃 This code does not work :

<ExcelExport
          data={dataSource}
          ref={exporter => {
            this._export = exporter;
          }}
        >
          <Grid data={dataSource}>
            <GridToolbar>
              <button title="Export PDF" className="k-button k-primary" onClick={this.export}>
                Export to Excel
              </button>
            </GridToolbar>
            {/* <Column field="tat" title="TATATAT" />
            <Column field="row_serial" title="row_serial" />
            <Column field="ordered" title="ordered" /> */}
            {columns &&
              columns.map((column, key) => (
                <Column
                  field={column.field}
                  title={column.title}
                  key={key}
                />
              ))}
          </Grid>
        </ExcelExport>

馃憤 This one works as expected :

<ExcelExport
          data={dataSource}
          ref={exporter => {
            this._export = exporter;
          }}
        >
          <Grid data={dataSource}>
            <GridToolbar>
              <button title="Export PDF" className="k-button k-primary" onClick={this.export}>
                Export to Excel
              </button>
            </GridToolbar>
            <Column field="tat" title="TATATAT" />
            <Column field="row_serial" title="row_serial" />
            <Column field="ordered" title="ordered" />
          </Grid>
        </ExcelExport>

Expected behavior

  • Should work in both cases.

Environment

Package versions:

  • @progress/kendo-react-excel-export: 1.2.0
  • @progress/kendo-react-grid: 1.2.0
@Xizario Xizario added Bug Item which indicates that something is not working pkg:Grid labels Aug 14, 2018
@Xizario
Copy link
Contributor

Xizario commented Aug 14, 2018

Until we fix this, you could use the excel export package directly, it will work for dynamically set columns.
An example: https://stackblitz.com/edit/react-9ab8lv?file=app/main.js

@digego
Copy link

digego commented Feb 5, 2019

any progress on fixing this?

@simonssspirit
Copy link
Contributor

@digego we have researched it and started working on it.

Once it is in the develop version we will update the issue.

@nstoychev nstoychev self-assigned this Mar 14, 2019
@nstoychev nstoychev added this to the 2.8.0 milestone Mar 14, 2019
@nstoychev
Copy link

Fixed in version 2.8.0-dev.201903151331.
Here is an updated example: https://stackblitz.com/edit/react-7xddct?file=app/main.js

@Xizario
Copy link
Contributor

Xizario commented Mar 25, 2019

Fixed in 2.8.0

@Xizario Xizario closed this as completed Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Item which indicates that something is not working pkg:Grid
Projects
None yet
Development

No branches or pull requests

5 participants