Author Topic: Apply styles and formatting to cells in exported excel  (Read 1923 times)

Lakshmi

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 10
    • View Profile
Apply styles and formatting to cells in exported excel
« on: March 28, 2019, 07:24:56 pm »
I have some styles and formatting applied to grid cells in column render function, like below.
render: function (ui) {     
                    //apply styles and replace every comma by new line for each cell             
                    return { style: "color:red", text: ui.cellData ? ui.cellData.replace(/,/g, '<br/>') : "" };
                }

I would like to have the same implemented in excel exported using exportData.

I tried using options nopretty and cssRules, but syntax is not present anywhere in API.

Could you please help by providing details on how to implement the above in grid?
Also, if there are examples for other options in exportData function, it will be helpful.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Apply styles and formatting to cells in exported excel
« Reply #1 on: March 28, 2019, 10:17:23 pm »