以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 想把日期列移到中间某个位置,代码如何改 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=191719) |
-- 作者:lihe60 -- 发布时间:2024/5/5 8:13:00 -- 想把日期列移到中间某个位置,代码如何改 With wb.AddTable("","Table1")
.PageNumber = page \'设置页码 .ActiveSheet = "menu" Dim nms() As String = {"NO.","产品","客户","数量","单价","日期"} .Head.AddRow(nms) For Each r As DataRow In dt.DataRows With .Body.AddRow(r("NO."),r("产品"),r("客户"),r("数量")) .Primarykey = r("_Identify") \'设置主键 .AddCell(Format(r("单价"),"#0.00")) .AddCell(Format(r("日期"),"MM月dd日")) End With Next End With [此贴子已经被作者于2024/5/5 9:09:01编辑过]
|
-- 作者:有点蓝 -- 发布时间:2024/5/5 20:52:00 -- 比如放到客户前面 Dim nms() As String = {"NO.","产品","日期","客户","数量","单价"} .Head.AddRow(nms) For Each r As DataRow In dt.DataRows With .Body.AddRow(r("NO."),r("产品"),Format(r("日期"),"MM月dd日"),r("客户"),r("数量")) .Primarykey = r("_Identify") \'设置主键
.AddCell(Format(r("单价"),"#0.00")) End With Next |
-- 作者:lihe60 -- 发布时间:2024/5/6 20:57:00 -- Format(r("发生日期"),"YYYY-MM-dd") [此贴子已经被作者于2024/5/6 20:58:15编辑过]
|
-- 作者:lihe60 -- 发布时间:2024/5/6 21:01:00 -- Format(r("发生日期"),"yyyy-MM-dd"),这样可以了。 |