以文本方式查看主题 - 易表在线答疑 (http://egrid2000.com/dvbbs/index.asp) -- 用户社区 (http://egrid2000.com/dvbbs/list.asp?boardid=2) ---- 学写Eval (http://egrid2000.com/dvbbs/dispbbs.asp?boardid=2&id=1650) |
-- 作者:swg-1954 -- 发布时间:2011/11/20 12:24:00 -- 学写Eval 见编辑栏内 |
-- 作者:swg-1954 -- 发布时间:2011/11/20 12:24:00 -- egd文件下载 |
-- 作者:wjq1072 -- 发布时间:2011/11/20 12:52:00 -- egd文件下载 |
-- 作者:swg-1954 -- 发布时间:2011/11/20 14:55:00 -- 谢谢wjq1072的指教,有点意思,运用Eval是有条件的。 |
-- 作者:wjq1072 -- 发布时间:2011/11/20 16:56:00 -- 不是“运用Eval是有条件的”,因为看不懂你是想删除哪些行?只能选择后再删除啦! |
-- 作者:swg-1954 -- 发布时间:2011/11/20 18:39:00 -- 删除按钮里就是要删除的行。 -=-=-=- 以下内容由 swg-1954 在 2011年11月20日 06:42pm 时添加 -=-=-=- 意思就是把删除按钮的公式改为用Eval来写。 -=-=-=- 以下内容由 swg-1954 在 2011年11月20日 06:43pm 时添加 -=-=-=- 本意是学写Eval |
-- 作者:wjq1072 -- 发布时间:2011/11/20 19:32:00 -- Eval("DelFor(gridname,""人物地区"",""="","""+Substitute("秦桧|妖精|白甸|西场|日本鬼|曲塘","|",""") And DelFor(gridname,""人物地区"",""="",""")+""")") |
-- 作者:swg-1954 -- 发布时间:2011/11/20 19:52:00 -- 谢谢wjq1072总版主!论坛上有写Eval的六步曲,但没有写出来,经wjq1072总版主的指教,又学了一招。再次表示诚挚的谢意! -=-=-=- 以下内容由 swg-1954 在 2011年11月20日 08:05pm 时添加 -=-=-=- 如何写好Eval总版主如有空可以根据不同情况给我们个示范。虽然论坛上有些,也进行了收集,但不如老师教的那么出神、忠恳,学起来更快,更灵活。 |
-- 作者:swg-1954 -- 发布时间:2011/12/18 19:00:00 -- 原来有10列公式都是用FindText来调用的,运行1万条左右的记录需要10多分钟,在wjq1072总版主的帮助和启发下,改用现在的公式,运行同样条记录只要5分钟左右,提高效率一倍,能否有Eval公式再提高一些,特请教学习。先谢谢啦! EvalFor(gridname,"上次峰","FindText(""数据采集"",""上次示数"",""示数类型"",""="",""正有功峰"",""电能表资产编号"",""="",[电能表资产编号])") And EvalFor(gridname,"上次谷","FindText(""数据采集"",""上次示数"",""示数类型"",""="",""正有功谷"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"上次总","FindText(""数据采集"",""上次示数"",""示数类型"",""="",""正有功总"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"本次峰","FindText(""数据采集"",""本次示数"",""示数类型"",""="",""正有功峰"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"本次谷","FindText(""数据采集"",""本次示数"",""示数类型"",""="",""正有功谷"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"本次总","FindText(""数据采集"",""本次示数"",""示数类型"",""="",""正有功总"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"本次抄见电量峰","FindText(""数据采集"",""重算电量"",""示数类型"",""="",""正有功峰"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"本次抄见电量谷","FindText(""数据采集"",""重算电量"",""示数类型"",""="",""正有功谷"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"本次抄见电量总","FindText(""数据采集"",""重算电量"",""示数类型"",""="",""正有功总"",""电能表资产编号"",""="",[电能表资产编号])")And EvalFor(gridname,"Y","If(([用户编号] = [用户编号] And [本次抄见电量总] >= 10 And [综合倍率] <= 15) Or (Cell(Row,""用户编号"")=[用户编号] And Cell(Row-1,""用户编号"")=[用户编号] And Cell(Row-1,""本次抄见电量总"") >= 10 And Cell(Row,""本次抄见电量总"") > 0 And [综合倍率] <= 15) Or (Cell(Row,""用户编号"")=[用户编号] And Cell(Row+1,""用户编号"")=[用户编号] And Cell(Row+1,""本次抄见电量总"") > 10 And Cell(Row,""本次抄见电量总"") > 10 And [综合倍率] <= 15),-1,0)") And EvalFor(gridname,"上次抄表时间","If(Date([本次抄表日期]) < EOMonth(Today(),-4)+1,"""",If(FindRow(""上次采集数据"",""电能表资产编号"",""="",[电能表资产编号]) > 0,FindText(""上次采集数据"",""本次抄表日期"",""电能表资产编号"",""="",[电能表资产编号]),FindText(GridName,""本次抄表日期"",""用户编号"",""="",[用户编号],""h"",""="",""拆换表"")))") |
-- 作者:wjq1072 -- 发布时间:2011/12/19 9:45:00 -- 这样的公式不可能用Eval简化的。 |