Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use PivotGrid to modify an exported Excel file

Shulou Source: shulou.com Published: 2022-06-03 06:30:56 11月16日 Update

This article mainly explains "how to use PivotGrid to modify the exported Excel file", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use PivotGrid to modify the exported Excel file" bar!

Kendo UI is the final collection of JavaScript UI components with jQuery, Angular, React, and Vue libraries, and no matter which JavaScript framework you choose, you can quickly build high-performance, responsive Web applications. With customizable UI components, Kendo UI can create data-rich desktop, tablet, and mobile Web applications. Kendo UI accelerates development time by 50 per cent through responsive layout, strong data binding, cross-browser compatibility, and ready-to-use themes.

You can apply different style and value changes to the Kendo UI PivtoGrid exported to Excel by modifying the generated Workbook object.

The following example shows how to do this.

Export$ (document) .ready (function () {var pivotgrid = $("# pivotgrid"). KendoPivotGrid ({excel: {fileName: "Kendo UI PivotGrid Export.xlsx", proxyURL: "/ / demos.telerik.com/kendo-ui/service/export", filterable: true}, excelExport: function (e) {var sheet = e.workbook.sheets [0]; var rows = sheet.rows;var rowIdx, colIdx, cells, cell;for (rowIdx = 0; rowIdx < rows.length) RowIdx++) {if (cells [rowIdx] .type = = "data") {cells = Rows [rowIdx] .cells; for (colIdx = sheet.freezePane.colSplit; colIdx < cells) {cell = cells [colIdx]; cell.background = "# aabbcc"; cell.value = kendo.toString (cell.value, "c") }, dataCellTemplate: $("dataCellTemplate"). Html (), filterable: true,sortable: true,columnWidth: 2000 height: 580 type: "xmla", columns: [{name: "[Date]. [Calendar]", expand: true}, {name: "[Product]. [Category]"}], rows: [{name: "[Geography]. [City]"}], measures: ["Measures]. [Reseller Freight Cost]"] Transport: {connection: {catalog: "Adventure Works DW 2008R2", cube: "Adventure Works"}, read: "/ / demos.telerik.com/olap/msmdpump.dll"}, schema: {type: "xmla"}, error: function (e) {alert ("error:" + kendo.stringify (e.errors [0])) }). Data ("kendoPivotGrid"); $("# export") .click (function () {pivotgrid.saveAsExcel ();});}); Thank you for reading, the above is "how to use PivotGrid to modify exported Excel files". After the study of this article, I believe you have a deeper understanding of how to use PivotGrid to modify exported Excel files, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Files learning applications content applications data programs components different powerful themes compatibility can be passed objects that is layouts tablets ideas situations articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Information Shulou Tech Info macOS Linux