以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  编号  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=158455)

--  作者:13796361423
--  发布时间:2020/11/20 15:22:00
--  编号

有133行, 1-66行,编号为“1”, 67行到133行编号为“2” , 表A有一个编号列。 请问如何实现


--  作者:有点蓝
--  发布时间:2020/11/20 15:31:00
--  
for i as integer = 0 to 65
tables(“a”).rows(i)("编号") =1
next

for i as integer = 66 to 132
tables(“a”).rows(i)("编号") =2
next

--  作者:13796361423
--  发布时间:2020/11/20 15:41:00
--  行数变化时
我的行总数一直在变, 可不可以让其更优化一下, 前一半自动编号为1, 后一半自动编号为2
--  作者:有点蓝
--  发布时间:2020/11/20 16:09:00
--  
dim cnt as integer = cint(tables(“a”).rows.count / 2)
for i as integer = 0 to cnt 
tables(“a”).rows(i)("编号") =1
next

for i as integer = cnt +1 to ables(“a”).rows.count - 1
tables(“a”).rows(i)("编号") =2
next