自定义按钮公式:
EvalFor(Grid,"农户编号","[农户编号]+char(9)") And EvalFor(Grid,"身份证号","[身份证号]+char(9)") And EvalFor(Grid,"户口本号","[户口本号]+char(9)") And EvalFor(Grid,"银行账号","[银行账号]+char(9)") And EvalFor(Grid,"银行账号","[银行账号]+char(9)") And ExportDBFile("D:\A.Xls",6,GridName) And EvalFor(Grid,"农户编号","Substitute([农户编号],char(9),"""")") And EvalFor(Grid,"身份证号","Substitute([身份证号],char(9),"""")")And EvalFor(Grid,"户口本号","Substitute([户口本号],char(9),"""")") And EvalFor(Grid,"银行账号","Substitute([银行账号],char(9),"""")")And EvalFor(Grid,"开户银行","Substitute([开户银行],char(9),"""")")
导出文件在D盘根目录,文件名为“A”。