Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
450
IgHierarchical grid :Cell formatting issue while exporting to excel
posted

Hi Team,

I am using a web hierarchical grid and I have a column (Project Total) which has datatype as "Number" and format as "Currency" .When I am exporting it to excel, cell format is getting change from number to text . I want the cell format as it is which is "Number" .

In below screenshot, yellow columns are coming as text which should be in number type and green columns are coming correctly. Although, its the same piece of code for the yellow ones and green ones .

 { key: "ProjectTotal", headerText: "Project Total", dataType: "number", format: "currency", width: "22%" }

Parents
  • 16310
    Offline posted

    Are the columns under A autogenerated, or is the child grid A autogenerated ? What is the difference between A and B in configuration ? I'm asking to verify if this may be a mistake in our code.

    Meanwhile, to resolve the issue, I suggest that you set column type for excel in the exportEnding event:

    exportEnding: function(sender, args) {
    	args.worksheet.columns(i).cellFormat().formatString("number");						
     }

Reply Children