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
5520
Export grid to excel with cell tooltip
posted

Hi,

Is there a way when exporting to excel to get the cells tooltips as cells comments in excel?

thanks

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello Hady,

    I was able to achieve this through the following code:

            private void ultraGridExcelExporter1_CellExporting(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs e)

             {

                 WorksheetCellComment comment = new WorksheetCellComment();

                 FormattedString str = new FormattedString(e.Value.ToString());

                 comment.Text = str;

                 e.CurrentWorksheet.Rows[e.CurrentRowIndex].SetCellComment(e.CurrentColumnIndex, comment);

             } 

    Please feel free to let me know if a question about our toolset comes up on your mind.

Children