Foxtable(狐表)用户栏目专家坐堂 → [求助] 修改报表字体


  共有2116人关注过本帖树形打印复制链接

主题:[求助] 修改报表字体

帅哥哟,离线,有人找我吗?
有点色
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/5/12 11:45:00 [显示全部帖子]

Select Case e.Book.TempLate
    Case "信息表"
        Dim Sheet As XLS.Sheet = e.Book.Sheets(0)
        For i As Integer = 2 To sheet.Rows.Count - 1
            If sheet(i, 3).text ="√"  Then
                For j As Integer = 0 To 3
                    Dim Style As Xls.Style = e.Book.NewStyle
                    style.ForeColor = Color.Red
                    style.Font = new Font("宋体", 10)
                    style.AlignHorz = sheet(i,j).Style.AlignHorz
                    style.BorderBottom = sheet(i,j).Style.BorderBottom
                    style.BorderColorBottom = sheet(i,j).style.BorderColorBottom
                    style.BorderColorRight = sheet(i,j).Style.BorderColorRight
                    style.BorderRight = sheet(i,j).Style.BorderRight
                    style.BorderColorleft = sheet(i,j).Style.BorderColorleft
                    style.Borderleft = sheet(i,j).Style.Borderleft
                    sheet(i,j).Style = style
                Next
            End If
           
        Next
End Select

 回到顶部