老师,请问如图表头能不能做到固定不动 滑动的时候只有内容滑动此主题相关图片如下:企业微信截图_20200513135643.png
代码:
With wb.AddTable("page1","Table2")
.head.AddRow("考勤部门","在册","实到","请假","旷工","填写时间") '表头
.Highlight = -1
For Each r As DataRow In dt.DataRows
Dim jo As New JObject
Dim aa As String = r("单据编号").Tostring
With .body.AddRow() '数据
.AddCell(r("车间名称") & "<br>" & r("姓名"),"style= 'height:40px' & aa & "')""")
.AddCell(r("在册人数"),"style= 'height:40px' & aa & "')""")
.AddCell(r("出勤人数"),"style= 'height:40px' & aa & "')""")
.AddCell(r("请假人数"),"style= 'height:40px' & aa & "')""")
.AddCell(r("旷工人数"),"style= 'height:40px' & aa & "')""")
If r.IsNull("填写时间") Then
.AddCell("未填写","style= 'height:40px;background-color: #ff7575' & aa & "')""")
Else
.AddCell(Format( r("填写时间"),"hh:mm"),"style= 'height:40px' & aa & "')""")
End If
End With
Next