以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- excel表模板代码怎么写? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=150640) |
||||
-- 作者:yfy13338431925 -- 发布时间:2020/6/3 16:17:00 -- excel表模板代码怎么写? 蓝老师:您好 excel表模板,要填入“表A"第一行第一列数据aaa和最后一行第一列数据bbb 格式为aaa-bbb,模板的代码怎么写?
|
||||
-- 作者:有点蓝 -- 发布时间:2020/6/3 16:33:00 -- 使用代码填充,比如:http://www.foxtable.com/webhelp/topics/2626.htm |
||||
-- 作者:yfy13338431925 -- 发布时间:2020/6/6 22:05:00 -- 蓝老师,我试着写了一下填充按钮,通过不了。得您帮帮我 Dim Book As New XLS.Book(ProjectPath & "Attachments\\订单.xls") \'打开模板 Dim fl As String = ProjectPath & "Reports\\订单.xls" Dim dr0 As DataRow dr0 = DataTables("表A").DataRows(0) Dim dr1 As DataRow dr1 = DataTables("表A").DataRows(???), \'最后一行该怎么写 Dim Sheet As XLS.Sheet = Book.Sheets(0) Sheet(2,1).Value = <[订单起止号]= "dr0"&"-"&"dr1"> ‘这样写也不对吧? Book.Build() \'生成报表 Book.Save(fl) Dim Proc As New Process Proc.File = fl Proc.Start()
|
||||
-- 作者:有点蓝 -- 发布时间:2020/6/7 20:53:00 -- Dim Book As New XLS.Book(ProjectPath & "Attachments\\订单.xls") \'打开模板 Dim fl As String = ProjectPath & "Reports\\订单.xls" Dim dr0 As DataRow dr0 = DataTables("表A").DataRows(0) Dim dr1 As DataRow dr1 = DataTables("表A").DataRows(DataTables("表A").count - 1), \'最后一行该怎么写 Dim Sheet As XLS.Sheet = Book.Sheets(0) Sheet(0,0).Value = "订单起止号: " & dr0("第一列") & "-" & dr1("第一列")
|
||||
-- 作者:yfy13338431925 -- 发布时间:2020/6/7 22:26:00 -- count不是datatables成员 |
||||
-- 作者:有点蓝 -- 发布时间:2020/6/7 22:37:00 -- DataTables("表A").datarows.count |