以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- excel报表的Style可以叠加吗 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=143320) |
-- 作者:fubblyc -- 发布时间:2019/11/21 9:31:00 -- excel报表的Style可以叠加吗 Dim st5 As XLS.Style = Book.NewStyle fnt5 = New Font("微软雅黑",8) st5.Font = fnt52 st5.BackColor = Color.Bisque st5.ForeColor = Color.black \' For i As Integer = 0 To 15 Sheet(4, i).Style = st5 \' next 然后想再加边框, dim st6 As XLS.Style = Book.NewStyle st6.BorderTop = XLS.LineStyleEnum.Thin st6.BorderBottom = XLS.LineStyleEnum.Thin st6.BorderLeft = XLS.LineStyleEnum.Thin st6.BorderRight = XLS.LineStyleEnum.Thin For i As Integer = 0 To 15 Sheet(4, i).Style = st6 \' next 现在这样做,就前面的st5的样式就被覆盖了。 |
-- 作者:有点蓝 -- 发布时间:2019/11/21 9:35:00 -- 无法叠加,把2段代码合并为一个样式 |