加入收藏 | 设为首页 | Life家族 | SCMLife | RMLife | PMLife | SQALife | TESTLife | 企业VIP专区 | 中文化荣誉殿堂

查看完整版本: Does CQ support excel borders object ?

ATester 2008-2-3 14:23

Does CQ support excel borders object ?

::em54::

Range("A1").Borders不好用。但是Range("A1").其它属性,就好用。

请问为什么ClearQuest老是说不支持borders 对象?

有什么好方法在ClearQuest 中设置新创建excel worksheet 选定部他的border格式?

yunshan 2008-2-3 15:04

回复 楼主 的帖子

最简单的途径就是去录制一段宏,修改一下就可以使用了

此外,对于range是可以设置borders的
如下:
With Sheet1
      .Range(.Cells(1,1),.Cells(5,10)).Select
End with
With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = 43
End With

但要注意,如果是一个单元格时,是没有Inside Borders的

ATester 2008-2-10 18:30

谢谢你,yunshan.
可这样也还是不好用啊.

这样录制的宏在vb里运行没问题,可是加到clearquest脚本里就不行啦.

这是错误提示:  Object required:'Selection'

yunshan 2008-2-15 12:01

回复 板凳 的帖子

这个当然不能在CQ中运行了
Selection属于Excel VBA的宏代码,脱离了VBA环境就不能运行了

ATester 2008-2-15 15:35

::em64::

找到方法啦:

For row = 1 to 2
     For col = 1 to m_days + 2
       newSheet.Cells(row,col).Borders.LineStyle = xlContinuous
       newSheet.Cells(row,col).Borders.ColorIndex = 1
    Next
Next

这样在CQ里运行,没问题....

Yun Shan :

Thanks for your help...
页: [1]
查看完整版本: Does CQ support excel borders object ?