kendo-react-excel-export

1 Answer 81 Views
Excel Export
Nigel
Top achievements
Rank 1
Nigel asked on 25 Jan 2022, 11:21 AM

Hi.

We're using kendo-react-excel-export version 3.7

Exporting data to Excel works fine EXCEPT when there's only 1 column of data.

In the following code, there is data in sheets but after the code is invoked, that data is not in workbooks.

Is this a known issue?

If so, is there is a workaround?

The application has been running for sometime. It is possible the situation where there is just one column of data doesn't happen very often.

const workbooks = sheets.map(x => this[x.ref].workbookOptions());

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 25 Jan 2022, 11:35 AM

Hello,

The export of multiple columns should be working as expected.

Ensure that the correct data is passed to the component.

if the issue still occurs, please share an example and I will be happy to take a look at it.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Nigel
Top achievements
Rank 1
commented on 26 Jan 2022, 04:36 PM

Hi Stefan

After further investigation we have found a hack for this issue

If we only have 1 heading on a sheet we simply add another with a value of empty string


          if (sheet.headings.length === 1) {
            sheet.headings = [...sheet.headings, ""];
          }

 

We've also noticed that this is an only an issue when we need to dynamically format the heading titles - i.e. giving them a different format dependent on the selected language

The hack does enable the single column to be displayed.

Any idea why ?


Stefan
Telerik team
commented on 27 Jan 2022, 05:53 AM

Hello,

I'm glad that you have found a solution.

I assume that when we use dynamic formats the sheets are modified and maybe something gets overwriten. We can provide a better explanation of why if we have a runnable version in order to inspect it. With only this code, we could only guess for the real reason.

Tags
Excel Export
Asked by
Nigel
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or