Using Infragistics version 22.2.19.
I have been very successful with the Excel export; but I am now trying to color the foreground/font on export. The Label Format works good:
DataPresenterExcelExporter.SetExcelLabelFormatSettings
but whatever Format Settings I pass into
DataPresenterExcelExporter.SetExcelCellFormatSettings
doesn't have any effect. And in the Handling of Cell Exporting, this doesn't have any effect
e.FormatSettings.FontColor = Colors.Red;
The Excel version I have is
Microsoft® Excel® for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20186) 64-bit
Hello,
Thank you for the update.Gald you were able to solved the issue.
I figured it out. Once I completely pasted your callback; I found my mistake. I was setting the event to cancel.
private void HandleCellExporting(object sender, CellExportingEventArgs e) { e.Cancel = true;
Don't know why I was doing that in the first place. Strange how everything else worked. You can close the case. Thank you for your help.
The difference between the version is ,V22.12 is latest ,might have included more bug fixes.
Did you try updating my sample against V22.2 ? You just need to delete V22.1 reference and manually add V22.2 reference , this would narrow down the issue, if it is indeed issue with V22.2 only.
Ok. Your example worked. I noticed your references are
InfragisticsWPF4.DataPresenter.ExcelExporter.v22.1
InfragisticsWPF4.DataPresenter.v22.1
InfragisticsWPF4.Documents.Excel.v22.1
InfragisticsWPF4.Editors.v22.1
InfragisticsWPF4.Themes.RoyalLight.v22.1
InfragisticsWPF4.v22.1
and mine are
Infragistics.WPF.v22.2.19
Infragistics.WPF.DataGrids.v22.2.19
Infragistics.WPF.DataGrids.Excel.v22.2.19
Infragistics.WPF.Excel.v22.2.19
Infragistics.WPF.Ribbon.v22.2.19
And so far, the only hiccup I have had is this color issue. I don't know the difference between InfragristicsWPF4 and Intragistics.WPF packages.
Hello Brett,
Did you try any other version ,you are not able to reproduce the issue with the other Microsoft Excel version?
Here is my test sample and I have the same Microsoft Excel version on my machine, I am not able to reproduce the issue.
Possibly your scenario is different. I used CellExporting event and set e.FormatSettings.FontColor.
Please modify my sample besed on your scenario to help reproducing the issue for further investigation.
6567.DataGridExportToExcelStylesColumns.zip