We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grouping grid do not export all the cells in the summary row to excel

I am using a grouping grid with GridSummaryColumnDescriptor column specified. When I export the grid to excel it exports the grid to excel but for the visible rows it only exports data for the first column in the grid & other column comes blank. for eg OrderId is exported but freight cell remains empty.
I have taken the sample from syncfusion 4.2 samples to replicate the problem I had in my application while exporting grouping grid visible rows to excel. the sample is attached and is the modified version of code available at C:\Program Files\Syncfusion\Essential Studio\4.2.0.37\windows\Grid.Grouping.Windows\Samples\SummaryInCaption\cs
. I have put the exported xls file into it. The exported xls file only displays the first column of the grouping grid in the excel it do not export the frieght column. I think this problem is specific to grouping grid with GridSummaryColumnDescriptor annd hence reproducible in the attached sample.
I will appreciate your immediate response.

Thanks,
Sachin

CS39.zip

10 Replies

AD Administrator Syncfusion Team November 3, 2006 11:58 AM UTC

Hi Sachin,

Our apologies for the delay in response.

Do you want to export the CaptionSummaryRow in a grid to Excel? If so, Please try the attached sample and let me know if you are trying something different.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/ExportCaptionSummaryCell_d5f608d5.zip

Best Regards,
Haneef


SB Sachin Bamel November 3, 2006 02:33 PM UTC

Hi Hanif,

The sample send by you exports the summary cell but there is a problem that it do not export the color for the summary cells as you can see the in the attached xls file with the updated code. Also there is one more problem that the export of all the rows is not correct now as can be seen in the other excel sheet when Syncfusion.GridExcelConverter.ConverterOptions.Default is set

CS40.zip


AD Administrator Syncfusion Team November 6, 2006 01:44 PM UTC

Hi Haneef,

Can you please check the request made by me in the previous thread?


AD Administrator Syncfusion Team November 7, 2006 02:43 PM UTC

Hi Haneef,

Any update for the cell color for summary rows mentioned below.

Thanks,
Sachin

>Hi Hanif,

The sample send by you exports the summary cell but there is a problem that it do not export the color for the summary cells as you can see the in the attached xls file with the updated code. Also there is one more problem that the export of all the rows is not correct now as can be seen in the other excel sheet when Syncfusion.GridExcelConverter.ConverterOptions.Default is set

CS40.zip


AD Administrator Syncfusion Team November 8, 2006 04:44 AM UTC

Hi Sachin,

We will work out for a solution and let you know the details soon. Thanks for being patience.

Best regards,
Haneef


AD Administrator Syncfusion Team November 8, 2006 12:48 PM UTC

Hi Sachin,

You would have to derive the GridExcelConverterBase class and export the elements using the ExportElements method. Please refer to the attached sample and let me know if you are looking something different.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/ExportCaptionSummaryCell_d5f608d5_d79187cf.zip

Best Regards,
Haneef


AD Administrator Syncfusion Team November 9, 2006 08:29 PM UTC

Hi Haneef,

I meant bit different problem find the changed code which you have send with the xls included. I mean the grey colour summary rows are exported but the color wont get exported.

Thanks,
Sachin

ExportCaptionSummaryCell_d5f608d5_d79187cf0.zip


AD Administrator Syncfusion Team November 15, 2006 12:36 AM UTC

Any update on the problem mentioned below?

>Hi Haneef,

I meant bit different problem find the changed code which you have send with the xls included. I mean the grey colour summary rows are exported but the color wont get exported.

Thanks,
Sachin

ExportCaptionSummaryCell_d5f608d5_d79187cf0.zip


AD Administrator Syncfusion Team November 16, 2006 12:48 PM UTC

Hi Sachin,

Sorry for the inconvenience caused.

We are looking into this issue and get back to you very soon.

Thanks for your patience.

Best regards,
Haneef


AD Administrator Syncfusion Team November 17, 2006 05:21 AM UTC

Hi Sachin,

Our apologies for the delay in response.

You need to export the GroupCaptionSummaryCell style instead of exporting the SummaryCell style for the caption row summary in a grid. Please refer to the attached sample and let me know if you are looking something different.

//Modifiication has done in a ExportCaption method....
GridSummaryColumnDescriptor col = summary.GetSummaryColumnAtCol(i);
if( col != null )
{
if( iFirstSummaryColIndex == iRealColCount)
iFirstSummaryColIndex = i;
GridTableCellStyleInfo cellstyle = col.Appearance.GroupCaptionSummaryCell;
CopyStyle(cellstyle ,sheet.Range[iRowIndex,i+ 1]);
sheet.Range[iRowIndex,i + 1 ].Text = col.GetDisplayText(captionRow.ParentGroup) ;
}
else
{
GridTableCellStyleInfo scellstyle = captionRow.Appearance.GroupCaptionSummaryCell;
CopyStyle(scellstyle ,sheet.Range[ iRowIndex, i + 1 ]);
}

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/ModifiedExportCaptionSummaryCell_647477de.zip

Thanks for your patience.

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon