|
发表于 2013-12-19 16:48:55
|
显示全部楼层
jianying012 发表于 2013-12-19 16:42
看了看文档,合计搞定了,但是排列还是不行
排列,是排序吗?还是分组?分组就是group了。排序的话,
语法:
group/grouph(分组字段, 过滤条件, 排序方式)
select/selecth(关键字段, 过滤条件, 排序方式)
排序方式:field:排序字段;order:{ ascending|descending };type:{ text|number }
说明:
field:需要排序的字段
order:顺序,ascending表示升序,descending表示降序。默认为升序。
type:字段类型,text为文本类型,number为数字类型。
例如:产品信息表需要按照产品单价排序,那么我们要在单元格内写:
p1.select(p1.ProductName,'','field:UnitPrice;order:ascending;type:number')
(第二个参数过滤条件为空,需要写一个’’来占位)
表示按照字段UnitPrice升序排序,字段类型为number型。也可以写成p1.select(p1.ProductName,'','field:UnitPrice')。 |
|