-- BS右对齐
\'根据此页数据生成网页
With wb.AddTable("", "Table1")
.PageNumber = page \'设置页码
.ActiveSheet = "menu"
if e.cookies("terminal")="电脑"
Dim nms() As String = {"NO.", "合同编号","合同名称", "单位名称", "合同金额","结算金额"}
.Head.AddRow(nms)
For Each r As DataRow In dt.DataRows
With .Body.AddRow(r("NO."),r("合同编号"),r("合同名称"), r("单位名称"))
.AddCell(Format(r("合同金额"), "#,000.00"))
.AddCell(Format(r("结算金额"), "#,000.00"))
.Primarykey = r("合同序号") \'设置主键
End With
Next
end if
if e.cookies("terminal")="手机"
Dim nms() As String = {"NO.", "发生日期", "合同编号", "数量", "金额"}
.Head.AddRow(nms)
For Each r As DataRow In dt.DataRows
With .Body.AddRow(r("NO."),Format(r("发生日期"),"yyyy-MM-dd"), r("合同编号"), r("数量"))
.AddCell(Format(r("金额"), "#0.00"))
.Primarykey = r("合同序号") \'设置主键
End With
Next
end if
End With
如何设置金额右对齐
此主题相关图片如下:无标题.png