在action文件中写入如下代码
function execute(req, res) {
var rptPath = "LAWCONT:/analyses/maintain/index_report/SSWCSX"; //获取表的路径
var sourceRpt = sz.metadata.get(rptPath).getObject(); //获取表对象
var prstResult = sourceRpt.calc();
var tb = prstResult.getComponent("rpt1"); //获取table
var noticeDatas = []; //创建空数组 待存储 table中每行数据
for (var row=1; row<tb.getRowCount(); row++) {
if (tb.getCell(row, 0).value != null) { //如果该行第一列不是空就将 该行 压到 数组内
var noticeData = {
topic: tb.getCell(row,6).value, //获取 table中 该行 第7列 数据
time: tb.getCell(row, 7).value,
path: tb.getCell(row, 0).value,
pathb2: tb.getCell(row, 1).value,
pathe2: tb.getCell(row, 4).value
};
noticeDatas.push(noticeData);
}
}
return noticeDatas; //返回 数组
}