Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
i setting the interior color of a cell in excel from a C# code and when i see the result in excel the color is not matching. The color i start from is RED and the result in the produced Excel document is BLUE. My question is, how do i set the Color property of the interior of a cell from a System.Drawing.Color instance... Here is what i tried... Microsoft.Office.Interop.Excel.Range rng = sheet.Cells[Row, Col] as Microsoft.Office.Interop.Excel.Range; rng.Interior.Color = (interiorCellColor.Value.R << 16) | (interiorCellColor.Value.G << 8) | interiorCellColor.Value.B; I also tried the ToArgb method with the same result... I will take any theory explaining the difference in color from what i start from and the result in excel. Remi |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Drawing toolbar: line color button | Excel Discussion (Misc queries) | |||
Can't format cell color/text color in Office Excel 2003 in files . | Excel Discussion (Misc queries) | |||
Pivot Tables Formatting interior color &Type Mismatch | Excel Programming | |||
Browse Forms Controls and change TextBox color based on cell color | Excel Programming | |||
How do I convert from a 'double' valued color to a System.Drawing.Color? | Excel Programming |