The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
i try to export my grid to Excel. But if I use the Color.fromargb() function, Excel does not show the correct Color, such as openoffice. Must I set a converter option or something else?
RCRajadurai C Syncfusion Team July 17, 2009 07:15 AM UTC
Hi Philip,
Thanks for your interest in Syncfusion Products.
The XlsIO has a color palette where it has the collection of colors holded in ExcelKnownColors enumerator. These colors are the defined colors to be displayed in the Excel Sheet. If the exported color is not in the ExcelKnownColor then it will take the closest of the RGB values which is available in it.
For Example, If we have one color r1, g1, b1 and another color r2, g2, b2 then we evaluate difference as (r1-r2)*(r1-r2) + (g1-g2)*(g1-g2)+(b1-b2)*(b1-b2). The smaller this values is, the closer colors are. Hence the exported color is not providing the same color in the Excel as it is in the Grid if the color value supplied through FromArgb funtion not exactly matches the known color.