回复 4楼18889186136的帖子
如下JS代码展示了如何在单元格设置日期格式:
- var f = new $.wijmo.wijspread.GeneralFormatter("ggg ee/MM/dd dddd",null,"ja-jp");
- activeSheet.getCell(1,1).formatter(f);
- activeSheet.getCell(1,1).value(new Date(2014,00,20));
- // Or
- $.wijmo.wijspread.Culture("ja-jp");
- activeSheet.getCell(1,1).formatter("ggg ee/MM/dd dddd");
- activeSheet.getCell(1,1).value(new Date(2014,00,20));
- //Or
- activeSheet.getCell(1,1).formatter("[$-411]ggg ee/MM/dd dddd");
- activeSheet.getCell(1,1).value(new Date(2014,00,20));
复制代码
以上代码是用日文举例的,SpreadJs的Culture可以参考文档:
http://helpcentral.componentone.com/NetHelp/SpreadHClientUG/webframe.html#culturecustom.html |