SpreadsheetGear颜色单元格 [英] SpreadsheetGear color cells

查看:231
本文介绍了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

= < span style ="font-size:x-small"> Color.Blue

工作表

= owner.Workbook.Worksheets [ " Sheet1" ]

aRange

= worksheet.UsedRange

= worksheet.UsedRange

worksheet.Cells.Interior.Color

worksheet.Cells.Interior.Color

< span style ="color:#ff0000; font-size:x-small"> = 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

希望它有所帮助!


这篇关于SpreadsheetGear颜色单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆