以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 变量可以作为列名吗 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=184616) |
-- 作者:lisangyu -- 发布时间:2022/12/16 10:35:00 -- 变量可以作为列名吗 蓝总: For Each kpi As String In kpis Dim dr As DataRow = DataTables ("趋势报表_table2").AddNew() dr("指标") = kpi Dim monthlys() As Integer = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} For Each monthly As Integer In monthlys Dim dr1 As DataRow = DataTables("统计表10").Find("指标=\'" & kpi & "\' and 月份 =" & monthly) If dr1 IsNot Nothing Then dr("单位") = dr1("单位") dr(monthly) = dr1("完成情况") Else dr(monthly) = “” End If Next |
-- 作者:有点蓝 -- 发布时间:2022/12/16 10:56:00 -- 可以。测试有什么问题 |