Articles in this section

How to export CellCommentTips to Excel by using GridExcelConverterControl?

You can export the CellCommentTips of GridControl to Excel by handling the QueryImportExportCellInfo event handler. In this event, the GridExcelTipStyleProperties is checked for ExcelTip properties and accordingly, the comment is added to the IRange.


//Create grid excel converter object
Syncfusion.GridExcelConverter.GridExcelConverterControl gecc = new Syncfusion.GridExcelConverter.GridExcelConverterControl();

//Hook the QueryImportExportCellInfo event to Export the comments.
gecc.QueryImportExportCellInfo += new Syncfusion.GridExcelConverter.GridImportExportCellInfoEventHandler(gecc_QueryImportExportCellInfo);

//Export the Comments to the Excel
void gecc_QueryImportExportCellInfo(object sender, Syncfusion.GridExcelConverter.GridImportExportCellInfoEventArgs e)
{
    ExcelCommentTip.GridExcelTipStyleProperties style = new ExcelCommentTip.GridExcelTipStyleProperties(e.GridCell);
    if (style.HasExcelTipText)
        e.ExcelCell.AddComment().Text = style.ExcelTipText;
}
'Create grid excel converter object
Private gecc As New Syncfusion.GridExcelConverter.GridExcelConverterControl()

'Hook the QueryImportExportCellInfo event to Export the comments.
Private gecc.QueryImportExportCellInfo += New Syncfusion.GridExcelConverter.GridImportExportCellInfoEventHandler(AddressOf gecc_QueryImportExportCellInfo)

'Export the Comments to the Excel
Private Sub gecc_QueryImportExportCellInfo(ByVal sender As Object, ByVal e As Syncfusion.GridExcelConverter.GridImportExportCellInfoEventArgs)
 Dim style As New ExcelCommentTip.GridExcelTipStyleProperties(e.GridCell)
 If style.HasExcelTipText Then
  e.ExcelCell.AddComment().Text = style.ExcelTipText
 End If
End Sub

The screenshots below illustrate the Exporting of cell comment tips to Excel.

 

Showing comment tips in grid


Figure
1: Comment Tips In GGC

 

Exported comment tips in excel


Figure
2: Exported Comment Tips in Excel


Sample Link:

C#: ExportingCellTipCommetns-C#-1609704047.zip

VB: ExportingCellTipComments-VB-868077761.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied