Telerik Forums
KendoReact Forum
1 answer
23 views

Hello
I'm having trouble using the Kendo mesh export feature
There is no selection status information in the "Selected" column of the exported file, which is always empty.
Is it possible to show selection status in exported files?

Axv86s (forked) - StackBlitz

Regards,
Sunny

Konstantin Dikov
Telerik team
 answered on 30 Jan 2024
0 answers
22 views
I'm currently trying to implement an excel export feature, and while it is very easy to implement for a singular grid, I've seen no demonstrations with this being done with nested grids/expandable rows. I currently have grids nested within each other with Kendo's expandable rows feature.

The implementation of these grids are spanned across multiple files, and I'm wondering if it would be possible to export the data from all of them into a singular excel sheet. 
Jonathan
Top achievements
Rank 1
 asked on 15 Jan 2024
1 answer
42 views

Hello Team,

I hope your weak is going smoothly.  I am reaching out to you because , I am facing problem to remove Row and Column header from pivot table view. Also, I dont want these fields to be downloaded in excel download as well. I am using kendo react pivot grid version: 

"@progress/kendo-react-pivotgrid": "^5.9.0",

I have succesfully expanded all fields (defaultRowAxes and defaultColumnAxes) by defaut. So, I do not need this fields in my pivot table view and downloaded excel file. I am using built in saveAsExcel function to download excel file. I want to remove the fields highlighted in rectangle (check attached image) from downloaded excel file also. I am attaching the screenshot for better understanding.Your assistance in resolving this matter would be grately appreciated.

Thanks in advance

Konstantin Dikov
Telerik team
 answered on 20 Nov 2023
1 answer
57 views
Hi,
I am using kendo React-Master-Detail Grids in my project. However, when using the export Excel function, only the main table is exported, and there are no subtables. Do we support exporting Excel containing subtables, and have the same hierarchical relationship as the table when previewing Excel?

 

Looking forward to your reply, thanks in advance!

R22hph (forked) - StackBlitz

 

Regards,
Sunny Hu
Hu
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 18 Sep 2023
1 answer
90 views
I have single dataset. I want to create multiple sheets in the same excel file.   i tried this example.                                          https://www.telerik.com/forums/how-to-add-multiple-sheet-in-react-export.     But its not saving. i am trying in functional components. Kindly help. Thanks
Wissam
Telerik team
 answered on 08 Sep 2023
0 answers
108 views
Grid's excel export group header functionality is not working as expected, although Excel export group footer is working as expected.

Project Dependencies: 
        "@progress/kendo-data-query": "1.5.4",
        "@progress/kendo-drawing": "1.9.4",
        "@progress/kendo-licensing": "1.3.0",
        "@progress/kendo-react-animation": "5.1.0",
        "@progress/kendo-react-data-tools": "5.1.0",
        "@progress/kendo-react-dateinputs": "5.1.0",
        "@progress/kendo-react-dropdowns": "5.1.0",
        "@progress/kendo-react-excel-export": "5.1.0",
        "@progress/kendo-react-grid": "5.1.0",
        "@progress/kendo-react-buttons":"5.1.0",
        "@progress/kendo-react-inputs": "5.1.0",
        "@progress/kendo-react-intl": "5.1.0",
        "@progress/kendo-react-pdf": "5.1.0",
        "@progress/kendo-react-treeview": "5.1.0",
        "@progress/kendo-theme-material": "3.31.0",

"react": "17.0.2",

Expectation: Excel export should display the group headers/footers.

Actual result: Excel export doesn't render the group headers, with footers being displayed as expected.

How to reproduce: 

1. For the following columns and grid data, create the following group descriptors (for example) and render function to use for the group headers(footers):


const data = () => [
		{
			key: "1",
			item_one: "Item_One One",
			item_two: "Item_Two Two",
			item_three: 5,
			item_four_one: "Item_Four_One 1",
			item_four_two: "Item_Four_Two 2",
			item_four_three: "Item_Four_Three 1",
			selected: false
		},
		{
			key: "2",
			item_one: "Item_One One",
			item_two: "Item_Two Three",
			item_three: 6,
			item_four_one: "Item_Four_One 1",
			item_four_two: "Item_Four_Two 2",
			item_four_three: "Item_Four_Three 1",
			selected: false
		},
		{
			key: "3",
			item_one: "Item_One Two",
			item_two: "Item_Two Five",
			item_three: 1,
			item_four_one: "Item_Four_One 1",
			item_four_two: "Item_Four_Two 2",
			item_four_three: "Item_Four_Three 1",
			selected: false
		},
		{
			key: "4",
			item_one: "Item_One Two",
			item_two: "Item_Two Three",
			item_three: 6,
			item_four_one: "Item_Four_One 1",
			item_four_two: "Item_Four_Two 2",
			item_four_three: "Item_Four_Three 1",
			selected: false
		}
	];

	const columns = (): Column[] => [
		{
			field: "item_one",
			title: "Item One",
			filterType: "text",
		},
		{
			field: "item_two",
			title: "Item Two",
			filterType: "text",
		},
		{
			field: "item_three",
			title: "Item Three",
			filterType: "numeric",
		},
		{
			field: "item_four",
			title: "Item Four",
			children: [
				{
					field: "item_four_one",
					title: "Item Four One"
				},
				{
					field: "item_four_two",
					title: "Item Four Two",
				},
				{
					field: "item_four_three",
					title: "Item Four three",
				}
			]
		},
	];


	const groups = [
		{field: "item_one", aggregates: [{ field: "item_three", aggregate: "sum" }] },
		{field: "item_two", aggregates: [{ field: "item_three", aggregate: "sum" }] }
	];

	const groupRenderer = (aggregates, field) => {
		const aggregate = aggregates.item_three.sum;
		if (field === "item_three") {                    
			return(aggregate && <> Total Item Three: {aggregate} </>)
		}
		return null;
	}



2. map the columns into the `ExcelExportColumnProps`:


const excelReportColumns = columns.map((column) => {
		return {
			field: column.field,
			title: column.title,
			children: column.children,
			groupHeader: (props: ExcelExportGroupHeaderProps) => groupRenderer(props.aggregates, props.field),
		} as ExcelExportColumnProps;
	}


3. pass those properties in the `ExcelExport` component:


return (
		<ExcelExport
			{...restExcelExportProps}
			creator={author}
			data={process(data, { sort: sortDesc, filter: filterDesc, group: groups }).data}
			ref={excelExporter}
			columns={excelReportColumns}
			group={groups}
		>
		</ExcelExport>
	)


4. Export the Excel file and notice that it doesn't render the group headers correctly. This only works for the excel group *footers*.

Remarks:

a) This procedure produces the expected results when the mapping in step 2 (above) is the following for the groupFooters:


const excelReportColumns = columns.map((column) => {
        return {
            field: column.field,
            title: column.title,
            children: column.children,
            groupFooter: (props: ExcelExportGroupFooterProps) => groupRenderer(props.aggregates, props.field),
        } as ExcelExportColumnProps;
    }



b) The `ExcelExportColumnProps` interface has the following properties (there are 2 properties named `groupHeader`):


export interface ExcelExportColumnProps extends ColumnBase {
		/**
		 * The options of the column data cells.
		 */
		cellOptions?: CellOptions;
		/**
		 * The field to which the column is bound.
		 */
		field?: string;
		/**
		 * The options of the column footer cell.
		 */
		footerCellOptions?: CellOptions;
		/**
		 * The column footer. Can be a function or a React component.
		 */
		footer?: Function | ExcelExportFooter;
		/**
		 * The options of the column group footer cells.
		 */
		groupFooterCellOptions?: CellOptions;
		/**
		 * The header of the group. Can be a function or a React component.
		 */
		groupHeader?: Function | ExcelExportGroupHeader;
		/**
		 * The footer of the group. Can be a function or a React component.
		 */
		groupHeader?: Function | ExcelExportGroupFooter;
		/**
		 * The options of the column group header cells.
		 */
		groupHeaderCellOptions?: CellOptions;
	}


Relevant screenshots: The footers are produced correctly, but not the headers.
Panagiotis
Top achievements
Rank 1
 asked on 24 Aug 2023
1 answer
48 views

Hi,

We use OData to get data, default page size is 10.
When we try to export to excel all pages of data it only exports first 10 records.
How can we export all pages of data ?

Thanks.

Konstantin Dikov
Telerik team
 answered on 03 Aug 2023
1 answer
81 views
I have a ui kendo grid i want to add a column containing a button when clicking this button i want to export the row dataItem with its detailed information to excel.
Konstantin Dikov
Telerik team
 answered on 17 Jul 2023
1 answer
88 views

Hello Team,

I am using Kendo React Pivot Table version @progress/kendo-react-pivotgrid": "^5.9.0". For downlaoding pivot table as excel, l am using saveAsExcel function given by export-to-excel library and followed this https://www.telerik.com/kendo-react-ui/components/pivotgrid/excel/ documentation.  I want to remove row and column headers from downloaded excel file. I have added screenshot for same. Your little help will be appriciated.

Thank You in Advance

Konstantin Dikov
Telerik team
 answered on 14 Jul 2023
0 answers
106 views

Ok I actually started asking this question but I think I figured it out in the process of trying to get an example.  However, still posting here as I think it could help someone, plus the behavior seems a bit like a bug to me.

What I was trying to do is create a grid with a toolbar with various tools.  The list of available tools changes based on if the user is an admin or not (some tools are hidden for non-admins).  The basic pseudo-code I'm using for this is as follows:

<Grid ...other options>
    <GridToolbar>
        <Button ... />
        { isAdmin && <Button ... /> }
    </GridToolbar>
    { ... columns }
</Grid>

Basically, making the second button conditional on a variable (in this case a props bool variable that is passed to the component).  This works just fine on the page and it renders properly based on that variable.  However, when you export to Excel you get this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'children')
    at ExcelExport._this.extractChild (ExcelExport.js:55:1)
    at ExcelExport.js:47:1
    at Array.map (<anonymous>)
    at ExcelExport._this.extractColumns (ExcelExport.js:45:1)
    at ExcelExport._this.extractChild (ExcelExport.js:54:1)
    at ExcelExport.js:47:1
    at Array.map (<anonymous>)
    at ExcelExport._this.extractColumns (ExcelExport.js:45:1)
    at ExcelExport.workbookOptions (ExcelExport.js:138:1)
    at ExcelExport.toDataURL (ExcelExport.js:119:1)

The toolbar shouldn't have anything to do with the Excel export so I would consider this a bug.  The workaround I have found is to return an empty div if the tool should not show up.  Like this:

<Grid ...other options>
    <GridToolbar>
        <Button ... />
        { isAdmin ? <Button ... /> : <div /> }
    </GridToolbar>
    { ... columns }
</Grid>
Doesn't seem like this should be necessary but it does work...
Stephen
Top achievements
Rank 1
 asked on 12 Jun 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?