以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 建表问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=160680) |
-- 作者:cqlpjks -- 发布时间:2021/2/14 15:12:00 -- 建表问题 Dim dtb As New DataTableBuilder("干部选拔任用评议统计表") dtb.AddDef("单位",Gettype(String),50) dtb.AddDef("单位代码",Gettype(String),8) dtb.AddDef("职工数",Gettype(Double)) dtb.AddDef("调查人数",Gettype(Double)) Dim djs() As String = {"A","B","C","D"} Dim pjs() As String = {"好","一般","不好","不了解"} For i As Integer = 1 To 4 For Each dj As String In djs dtb.AddDef("内容"& i & dj & "人",Gettype(Decimal),"","内容" & i & "_"& dj &"_人数") dtb.AddDef("内容"& i & dj & "%",Gettype(Decimal),"","内容" & i & "_"& dj &"_%") Next Next Dim dj1s() As String = {"A","B","C","D","E","F","G","H","I"} Dim wts() As String = {"不严格","个人说了算","干部标准不够","论资排辈","任人唯亲","跑官要官","回避不严格","擅自设置职务名称","结构不合理"} For j As Integer = 5 To 5 For Each dj1 As String In dj1s dtb.AddDef("内容"& j & dj1 & "人",Gettype(Decimal),"","内容" & j & "_"& dj1 &"_人数") dtb.AddDef("内容"& j & dj1 & "%",Gettype(Decimal),"","内容" & j & "_"& dj1 &"_%") Next Next dtb.Build() 即表中"A","B","C","D"依次更换为"好","一般","不好","不了解"。 如何修改代码?请指教。谢谢! |
-- 作者:cqlpjks -- 发布时间:2021/2/14 16:51:00 -- 已经解决了,谢谢! For j As Integer = 0 To djs.length - 1 dtb.AddDef("内容"& i & djs(j) & "人",Gettype(Decimal),"","内容" & i & "_"& pjs(j) &"_人数") dtb.AddDef("内容"& i & djs(j) & "%",Gettype(Decimal),"","内容" & i & "_"& pjs(j) &"_%") Next
|