if li_rtn=1 then IF FileExists(ls_pathname) then li_rtn = MessageBox("保存", ls_pathname+"已经存在,是否覆盖?",Exclamation!, YesNo!) end if if li_rtn=1 then //当文件存在用户选择覆盖,或是文件本就不存在时。注意变量li_rtn li_rtn=dwc_datawin.SaveAs(ls_pathname,Excel!,true) if li_rtn=1 then MessageBox("提示信息","导出数据成功!") else MessageBox("错误信息","导出数据失败!") return -1 end if else return 0 end if else return 0 end if return 1