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?
Regards,
Sunny
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
Looking forward to your reply, thanks in advance!
Regards,
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;
}
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;
}
return (
<ExcelExport
{...restExcelExportProps}
creator={author}
data={process(data, { sort: sortDesc, filter: filterDesc, group: groups }).data}
ref={excelExporter}
columns={excelReportColumns}
group={groups}
>
</ExcelExport>
)
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;
}
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;
}
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.
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
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>