以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 多层表头错误 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=117023) |
-- 作者:yifan3429 -- 发布时间:2018/4/4 11:52:00 -- 多层表头错误 With wb.AddTable("","Table1") Dim nms() As String = {"部门名称","本月目标","今日_进店人数","今日_成交人数","今日_成交金额","本月_累计进店人数","本月_累计成交人数","本月_累计成交金额","本月_累计达成率"} .Head.AddRow("部门名称","本月目标","今日","今日","今日","本月","本月","本月","本月") \'第一层标题 .Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","成交人数","成交金额","达成率") \'第二层标题 .Head.AddRow(nms) For Each r As DataRow In DataTables("每日业绩明细").sqlSelect("", "", "日期 Desc") \'For Each r As DataRow In DataTables("终端用户").sqlSelect("[报备人] = \'" & name & "\'", "", "日期 Desc") With .Body.AddRow() For Each nm As String In nms .AddCell(r(nm)) Next End With End With e.WriteString(wb.Build) |
-- 作者:有点甜 -- 发布时间:2018/4/4 12:31:00 -- 要这样添加的,你要添加多少层,多少列,都是这样添加。全部都要写出来才行。
.Head.AddRow("部门名称","本月目标","今日","今日","今日","本月","本月","本月","本月") \'第一层标题 .Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","成交人数","成交金额","达成率") \'第二层标题
|
-- 作者:yifan3429 -- 发布时间:2018/4/4 14:50:00 -- 我是这样添加的呀 Dim nms() As String = {"部门名称","本月目标","今日_进店人数","今日_成交人数","今日_成交金额","本月_累计进店人数","本月_累计成交人数","本月_累计成交金额","本月_累计达成率"} 这个不是不要显示吗 但是他显示出来了。 你看下截图
[此贴子已经被作者于2018/4/4 15:02:29编辑过]
|
-- 作者:有点甜 -- 发布时间:2018/4/4 15:10:00 -- 你看不懂代码?
.Head.AddRow("部门名称","本月目标","今日","今日","今日","今日","今日","本月","本月","本月","本月") \'第一层标题 .Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","累计", "成交人数","成交金额","达成率","累计") \'第二层标题
[此贴子已经被作者于2018/4/4 15:10:48编辑过]
|
-- 作者:yifan3429 -- 发布时间:2018/4/4 19:40:00 -- .Head.AddRow("部门名称","本月目标","今日","今日","今日","今日","今日","本月","本月","本月","本月") \'第一层标题 .Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","累计", "成交人数","成交金额","达成率","累计") \'第二层标题 按照你的方法还是不行 现在还是三层表头 多出的字段没搞明白什么需求 Dim nms() As String = {"部门名称","本月目标","今日_进店人数","今日_成交人数","今日_成交金额","本月_累计进店人数","本月_累计成交人数","本月_累计成交金额","本月_累计达成率"} .Head.AddRow("部门名称","本月目标","今日","今日","今日","本月","本月","本月","本月") \'第一层标题 对应三个今日 四个本月 .Head.AddRow("部门名称","本月目标","进店人数","成交人数","成交金额","进店人数","成交人数","成交金额","达成率") \'第二层标题 这是帮助原吗 对应的字段 \'下面这个数组,用实际的列名. Dim nms() As String = {"产品","东部_一季度","东部_二季度","东部_三季度","东部_四季度","南部_一季度","南部_二季度","南部_三季度","南部_四季度"} .Head.AddRow("产品","东部","东部","东部","东部","西部","西部","西部","西部") \'第一层标题 .Head.AddRow("产品","一季度","二季度","三季度","四季度","一季度","二季度","三季度","四季度") \'第二层标题 |
-- 作者:有点甜 -- 发布时间:2018/4/4 19:56:00 -- 删除你这句代码啊 .Head.AddRow(nms) |