https://help.fanruan.com/finereport10.0/doc-view-2597.html var widgetNames = ; //定义数组存放控件名称function getWidgetValueByName(name) { var widget = _g().parameterEl.getWidgetByName(name); //根据控件名获取控件值 if (widget == undefined) return; var obj = {}; obj = widget.getValue(); return obj; //返回控件值组成的数组}var paramJson = widgetNames.map(getWidgetValueByName).reduce(function(a, b) { return Object.assign(a, b)});var paramJsonStr = JSON.stringify(paramJson); //将json数据转换为字符串_g().directExportToExcel("ds3", "库存签字确认表", encodeURIComponent(paramJsonStr), "");