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
|