Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
Hi Team,
Is there any way to set the pattern color and pattern style of a cell before exporting to excel using jQuery?
Thanks,
Julian A
Hi,
To apply background color to he exported Excel file you need to handle the excelExport event and modify the e.workbook object.
sheets.rows.cells.background
For example:
excelExport: function(e) { e.workbook.sheets[0].rows.forEach(row=>{ row.cells.forEach(cell=>{ // apply background color to 'Alice Mutton' if(cell.value && typeof cell.value=="string" && cell.value === "Alice Mutton"){ cell.background = "#FF0000"; } }) }) }
Dojo demo: https://dojo.telerik.com/IxAraqaz
Regards, Nikolay Progress Telerik