Excel服务器使用大全:使得“物料编号”、“物料名称”不重复
1.打开“物料基本信息”模板:
2.选中G2,从“插入”中选择“函数”:

ESF_getFldValue是Excel服务器自带的函数,用于从数据库中取数:
ES_getFldValue(数据表名,需要显示字段名,条件字段名,条件值)
3.点击“确定”:

4.点击“确定”,在E7:F7合并,并插入公式:if(G2="","","提示信息:物料编码重复!")

5.同样,在G3中输入公式ESF_getFldValue("物料基础信息_主表","物料名称","物料名称",C3)
6.同样,在E8:F8的合并单元格中插入公式:if(G3="","","提示信息:物料名称重复!")
7.点击“报表”-“我的工作台”:

8.从“其它”中,选择“物料基础信息”,选择鼠标右键菜单“新建”:

9.分别在B2,B3中填入1,w,则有如下显示:

10.为了不干扰视线,在模板中将G列隐藏。