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
Status: New
DataPresenterExcelExporter copies all the cell font and background styles by default during export to excel.

Problem -

Currently DataPresenterExcelExporter is not copying the color properties applied to cell like font color, background etc., to excel by default.

Workarounds -

As of now we have to follow below methods to achieve it -

1. Handle CellExporting event and get CellValuePresenterStyle of the field in it and get the properties set in that style and apply those explicitly to excel format settings.

Cons:

  1. Cell style applied using WPF StyleSelector at run time won't be available in CellValuePresenterStyle.
  2. Need to write duplicate logic of applying styles again based on cell value which we would have already take care on XamDataGrid side.

2. Set ExportFormatSettings in the XamDataGrid itself for each field.

Cons:

  1. Difficult in case of auto generated fields case where we are not declaring any fields under XamDataGrid.

Expected Behavior -

It will be very useful, if DataPresenteExcelExporter itself copies basic cell styles which are common to excel cell by default.

Thanks & Regards,

Siva Prakash K.