Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Interop - "Unable to set the Color property of the Interior class"
Hello! I am begging for your help...
I am using the Excel interop (Microsoft Excel 11.0 Object Library, version 1.5.0.0) to open an existing workbook and adding conditional formats to certain cells to mimic "hidding" them. I keep receiving exceptions from the "Microsoft Office Excel" interop to the effect that I cannot set the font's color and the interior's color. If you know, could you please reply to this posting? Thanks! The C# code is as follows: conditionalFormat = conditionalFormats.Add(Excel.XlFormatConditionType .xlExpression , System.Reflection.Missing.Value , (object)formulas.ToString(), System.Reflection.Missing.Value); conditionalFormat.Font.Color = 0xff00; // triggers the "Unable to set the Color property of the Font class" conditionalFormat.Interior.Color = 0xff00; // triggers the "Unable to set the Color property of the Interior class" // conditionalFormat.Font.ColorIndex = 19; Triggers the "Unable to set the ColorIndex property of the Font class" // conditionalFormat.Interior.ColorIndex = 19; Triggers the "Unable to set the ColorIndex property of the Interior class" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unable to get the Interior property of the PlotArea class | Charts and Charting in Excel | |||
"Unable to set the Formula property of the Series class" with a tw | Charts and Charting in Excel | |||
unable to get the Interior property of the range class | Excel Programming | |||
"Unable to get the Pivotfieldsd property of the Pivot Class" | Excel Programming | |||
Unable to set the colorIndex Property of the Interior Class Error | Excel Programming |