Select Case e.Path
Case "test.htm"
Dim wb As New WeUI
wb.AppendHTML("<style>.mark{background-color:red; color:white;}</style>", True) '添加样式
With wb.AddTable("","Table1")
.Attribute= "border='2'"
.head.AddRow("部门","姓名","年龄","地址")
With .body.AddRow()
.AddCell("技术部", "style='border:red solid 1px'") '逐个单元格增加
.AddCell("李四", "style='border:red solid 1px'") '第二个参数用于设置单元格的Attribute属性
.AddCell("38", "style='border:red solid 1px'") '用AddCell可以一次添加多个单元格
.AddCell("中国上海", "style='border:red solid 1px'")
End With
With .body.AddRow()
.AddCell("技术部2", "style='border-left: 0px;border-right:0px'") '逐个单元格增加
.AddCell("李四", "style='border-left: 0px;border-right:0px'") '第二个参数用于设置单元格的Attribute属性
.AddCell("38", "style='border-left: 0px;border-right:0px'") '用AddCell可以一次添加多个单元格
.AddCell("中国上海", "style='border-left: 0px;border-right:0px'")
End With
With .body.AddRow()
.AddCell("技术部3", "style='border-left: 0px;border-right:0px;border-top:red solid 1px'" ) '逐个单元格增加
.AddCell("李四", "style='border-left: 0px;border-right:0px;border-top:red solid 1px'") '第二个参数用于设置单元格的Attribute属性
.AddCell("38", "style='border-left: 0px;border-right:0px;border-top:red solid 1px'") '用AddCell可以一次添加多个单元格
.AddCell("中国上海", "style='border-left: 0px;border-right:0px;border-top:red solid 1px'")
End With
End With
e.WriteString(wb.Build)
End Select