Skip to content

Replies

0
Tapas Bisoi
Tapas Bisoi answered on Nov 15, 2019 10:17 AM

Thanks Martin, Its working perfectly now .

0
Tapas Bisoi
Tapas Bisoi answered on Nov 13, 2019 11:25 AM

Your sample is working only for 2 columns . Its not working for more than 2 columns .If I am adding one more column in the child grid and adding a row args.worksheet.rows().item(0).setCellValue(3, "  "); in exportEnding event ,its giving extra column header as "2" .

0
Tapas Bisoi
Tapas Bisoi answered on Nov 13, 2019 9:58 AM

Thanks for your help Martin, Its working .

I have one more issue in the same excel .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” .

0
Tapas Bisoi
Tapas Bisoi answered on Nov 8, 2019 3:48 PM

In my code,I have hierarchical grid which is having only 1 column (Name) in main or parent grid which is "Bonet Robert" and under that grid,I do have one more grid with only one column(status) which is "A" and under "A" , I have one more grid which is having all other columns like "Address,Billing  name,region" etc.

Now when I export this to excel ,I get column 1 ,column 2 and so on for the main grid which is having only 1 column "Name" .

you can match these values with the excel.

var northwind = {

            "results": [

                {

                    "Name": "Bonet Robert",

                    ProjectStatus: [

                        {

                            "ProjectStatus": "A",

 

                            Orders: [

                                {

                                    “CSA”: “18ps3021-19”, “CustomerBillingName”: “Ernsh”, “ServiceAddress”: “RW Electric”,

                                    “Region”: “DPSO”, “ProjName”: “ALLCONNECT”,

                                    “ProjectTotal”: “1000”

 

                                }                            

                            ] 

                        }    ]   }]}