斜线设置
和斜线设置有关的属性:
- Diagonal
返回或设置斜线的方向,XLS.DiagonalEnum型枚举,可选值有:
Backward:反斜线
Forward:斜线
None:无
- DiagonalColor
返回或设置斜线颜色
- DiagonalStyle
返回或设置斜线的类型,XLS.LineStyleEnum型枚举,主要可选值有:
Dashed: 虚线
Dotted:点线
Double:双实线
Hair:头发丝一样的细线(一个像素)
Medium:中等实线
MediumDashDotDotted:中等的(短线+点+点)
MediumDashDotted: 中等的(短线+点)
MediumDashed: 中等虚线
None:无
Thick:粗线
Thin:细线
ThinDashDotDotted:细(短线+点+点)
ThinDashDotted:细(短线+点)
示例
Dim
Book
As New XLS.Book()
Dim Sheet As
XLS.Sheet = Book.Sheets(0)
Dim Style As
XLS.Style = Book.NewStyle()
Style.DiagonalStyle= XLS.LineStyleEnum.Thin
Style.DiagonalColor =Color.Red
Style.Diagonal = XLS.DiagonalEnum.Backward
For r As
Integer =
1
to
2
For c
As
Integer =1
To
2
Sheet(r,c).Style = Style
Next
Next
Book.Save("c:\reports\test.xls")
Dim Proc As
New Process
Proc.File = "c:\reports\test.xls"
Proc.Start()
生成的工作表:
本页地址:http://www.foxtable.com/webhelp/topics/1164.htm