Number Format, JavaScript Programming Example of Number Format in SpreadSheet

JavaScript Programming Example of Number Format in SpreadSheet

See how you can customize the way numbers look. Check out a free coding sample below.

JS Code

var data = {"conditions":[],"styles":[["wss1",";;right;;;;;;;;;;;;;"],["wss2",";;center;;;;;;;;;;;;;"],["wss3","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format0;;;;"],["wss4",";;;;;;;;;;;format0;;;;"],["wss5","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format1;;;;"],["wss6",";;;;;;;;;;;format1;;;;"],["wss7","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format2;;;;"],["wss8",";;;;;;;;;;;format2;;;;"],["wss9","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format3;;;;"],["wss10",";;;;;;;;;;;format3;;;;"],["wss11","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format4;;;;"],["wss12",";;;;;;;;;;;format4;;;;"],["wss13","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format5;;;;"],["wss14",";;;;;;;;;;;format5;;;;"],["wss15","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format6;;;;"],["wss16",";;;;;;;;;;;format6;;;;"],["wss17","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format7;;;;"],["wss18",";;;;;;;;;;;format7;;;;"],["wss19","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format8;;;;"],["wss20",";;;;;;;;;;;format8;;;;"],["wss21","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format11;;;;"],["wss22",";;;;;;;;;;;format11;;;;"],["wss23","#666666;#ffffff;right;'PT Sans', Tahoma;15px;;;;;;no,;format9;;;;"],["wss24",";;;;;;;;;;;format9;;;;"],["wss25",";;;;;;;;;;;string;;;;"]],"spans":[],"ranges":[],"sizes":[[0,1,336],[0,9,117],[0,10,128]],"table":{"frozenColumns":0,"frozenRows":0,"gridlines":1,"headers":1},"data":[[2,2,"1111","wss1"],[2,3,"1111.2","wss1"],[2,4,"1111.22","wss1"],[2,5,"1111.222","wss1"],[2,6,"-1111.222","wss1"],[2,7,"0","wss1"],[2,8,"Text",""],[2,9,"200.1","wss1"],[2,10,"123456789","wss1"],[3,1,"0.00","wss25"],[3,2,"1111","wss3"],[3,3,"1111.2","wss3"],[3,4,"1111.22","wss3"],[3,5,"1111.222","wss3"],[3,6,"-1111.222","wss3"],[3,7,"0","wss3"],[3,8,"Text","wss4"],[3,9,"200.1","wss3"],[3,10,"123456789","wss3"],[4,1,"0.##",""],[4,2,"1111","wss5"],[4,3,"1111.2","wss5"],[4,4,"1111.22","wss5"],[4,5,"1111.222","wss5"],[4,6,"-1111.222","wss5"],[4,7,"0","wss5"],[4,8,"Text","wss6"],[4,9,"200.1","wss5"],[4,10,"123456789","wss5"],[5,1,"0.??",""],[5,2,"1111","wss7"],[5,3,"1111.2","wss7"],[5,4,"1111.22","wss7"],[5,5,"1111.222","wss7"],[5,6,"-1111.222","wss7"],[5,7,"0","wss7"],[5,8,"Text","wss8"],[5,9,"200.1","wss7"],[5,10,"123456789","wss7"],[6,1,"0.0?",""],[6,2,"1111","wss9"],[6,3,"1111.2","wss9"],[6,4,"1111.22","wss9"],[6,5,"1111.222","wss9"],[6,6,"-1111.222","wss9"],[6,7,"0","wss9"],[6,8,"Text","wss10"],[6,9,"200.1","wss9"],[6,10,"123456789","wss9"],[7,1,"0.0#",""],[7,2,"1111","wss11"],[7,3,"1111.2","wss11"],[7,4,"1111.22","wss11"],[7,5,"1111.222","wss11"],[7,6,"-1111.222","wss11"],[7,7,"0","wss11"],[7,8,"Text","wss12"],[7,9,"200.1","wss11"],[7,10,"123456789","wss11"],[8,1,"(0.00)",""],[8,2,"1111","wss13"],[8,3,"1111.2","wss13"],[8,4,"1111.22","wss13"],[8,5,"1111.222","wss13"],[8,6,"-1111.222","wss13"],[8,7,"0","wss13"],[8,8,"Text","wss14"],[8,9,"200.1","wss13"],[8,10,"123456789","wss13"],[9,1,"[>1000]> 0.0;[>100]Check 0,000.0#;[=0]Nope",""],[9,2,"1111","wss23"],[9,3,"1111.2","wss23"],[9,4,"1111.22","wss23"],[9,5,"1111.222","wss23"],[9,6,"-1111.222","wss23"],[9,7,"0","wss23"],[9,8,"Text","wss24"],[9,9,"200.1","wss23"],[9,10,"123456789","wss23"],[10,1,"[>1000][red];[>100][green]0.0;[blue]\"Small\"",""],[10,2,"1111","wss21"],[10,3,"1111.2","wss21"],[10,4,"1111.22","wss21"],[10,5,"1111.222","wss21"],[10,6,"-1111.222","wss21"],[10,7,"0","wss21"],[10,8,"Text","wss22"],[10,9,"200.1","wss21"],[10,10,"123456789","wss21"],[11,1,"[GREEN]0.00; [RED]0.00",""],[11,2,"1111","wss19"],[11,3,"1111.2","wss19"],[11,4,"1111.22","wss19"],[11,5,"1111.222","wss19"],[11,6,"-1111.222","wss19"],[11,7,"0","wss19"],[11,8,"Text","wss20"],[11,9,"200.1","wss19"],[11,10,"123456789","wss19"],[12,1,"0,000.0","wss25"],[12,2,"1111","wss17"],[12,3,"1111.2","wss17"],[12,4,"1111.22","wss17"],[12,5,"1111.222","wss17"],[12,6,"-1111.222","wss17"],[12,7,"0","wss17"],[12,8,"Text","wss18"],[12,9,"200.1","wss17"],[12,10,"123456789","wss17"],[13,1,"#,###.#",""],[13,2,"1111","wss15"],[13,3,"1111.2","wss15"],[13,4,"1111.22","wss15"],[13,5,"1111.222","wss15"],[13,6,"-1111.222","wss15"],[13,7,"0","wss15"],[13,8,"Text","wss16"],[13,9,"200.1","wss15"],[13,10,"123456789","wss15"]],"locked":[],"editors":[],"filters":[],"formats":[["format0","0.00"],["format1","0.##"],["format2","0.??"],["format3","0.0?"],["format4","0.0#"],["format5","(0.00)"],["format6","#,###.#"],["format7","0,000.0"],["format8","[GREEN]0.00;[RED]0.00"],["format11","[>1000][red];[>100][green]0.0;[blue] \"Small\""],["format9","[>1000]> 0.0;[>100]\"Check\" 0,000.0#;[=0]Nope"]]};		

webix.ready(function(){
  webix.ui({
    id:"ssheet",
    view:"spreadsheet",
    toolbar: "full",   
    data: data
  });
});

Would you like to be able to customize numbers in your spreadsheet effortlessly?