参考实例:ZK spreadsheet 1.0 demo/WebContent/test2/DeleteRows/index.zul
1. 设置sheet的值
<spreadsheet id="ss1" url="/test2/xls/empty.xls" width = "800px" height = "200px" maxrows = "30" /> <zscript> var sheet = ss1.getSelectedSheet(); for( r = 0 ; r != 30 ; r++ ) { for( c = 0 ; c != 3 ; c++ ) { sheet.setCellValue( r , c , r+1 ); } } ss1.focusTo(19,0); </zscript>
|
2. 获取sheet中cell的值
<zscript> void getCell() { var sheet2 = ss1.getSelectedSheet(); alert(sheet2.getCell(1,1).getEditText()); // 获取2行2列 } </zscript>
|
阅读(602) | 评论(0) | 转发(0) |