SpreadsheetGear颜色单元格

问题描述:

我正在尝试使用Spreadsheet齿轮对单元格进行着色

I am trying to color cells with Spreadsheet gear along the lines of

aRange [aRow,0] .Interior.Color

aRange[aRow, 0].Interior.Color

= Color.Blue

工作表

= owner.Workbook.Worksheets [ " Sheet1" ]

aRange

= worksheet.UsedRange

= worksheet.UsedRange

worksheet.Cells.Interior.Color

worksheet.Cells.Interior.Color

= Color.Blue

 

无论我做什么,我最终得到以下内容:

Whatever I do I end up with the following:

'[]'对象没有属性"颜色"。同样的情况发生在我错过了什么,为什么范围显然是"无类型"?

'[]' object has no attribute "Color". Same happens with borders. What am I missing and why is the range apparently a "none type" ?

当我调用aRange [0,0] .RowHeight我可以使用单元格的高度。

When I call aRange[0,0].RowHeight I can work with the height of the cell.

 

感谢您的帮助

dietbeck

 

 

 

 

Hello Dietbeck,

Hello Dietbeck,

尝试使用 .ColorIndex 代替of .Color

希望它有所帮助!