回复 13楼18889186136的帖子
SpreadJS 设置 Format 方法请参考以下代码:
- var dvalue= 12345.6789;
- activeSheet.setValue(0,0,dvalue);
- activeSheet.getCell(0, 1).formatter("M");
- activeSheet.setValue(0, 1, new Date(2011, 2, 9));
- activeSheet.getCell(0, 2).formatter("m");
- activeSheet.setValue(0, 2, new Date(2012, 10, 15));
- activeSheet.getCell(0, 3).formatter("General");
- activeSheet.setValue(0, 3, new Date(2012, 10, 15));
- activeSheet.getCell(0, 4).formatter("#.#%");
- activeSheet.setValue(0, 4, 1);
- activeSheet.getCell(1, 0).formatter("[>2]0.0;[<-3]0.0;zero;");
- activeSheet.setValue(1, 0, 3);
复制代码 |