Multiple Sheets, JavaScript Programming Example of Multiple Sheets in SpreadSheet

JS Programming Example of Multiple Sheets in SpreadSheet

You can link data of several sheets in Webix Spreadsheet and use these cross-references in formulas to process them together. See a free programming example of how to enable this below.

JS Code

webix.ready(function(){
  webix.ui({
    view:"spreadsheet",
    id:"sheet",
    toolbar: "full",
    liveEditor:true,				
    data:{ sheets: math_data },
    bottombar:true
  });
});

HTML Code

<script>
var math_data = [{"name":"Report","content":{"conditions":[],"sizes":[[0,2,407],[0,4,207],[4,0,115]],"styles":[["wss1",";;;;;;;;;wrap;;;;;;"],["wss2",";;;;;;;;;nowrap;;;;;;"],["wss3",";;;;;;;;;;;percent;;;;"]],"spans":[],"ranges":[],"table":{"frozenColumns":0,"frozenRows":0,"gridlines":1,"headers":1},"data":[[2,2,"You can fill charts and dropdowns from a different sheet","wss2"],[2,3,"","wss2"],[2,4,"Germany",""],[2,5,"","wss2"],[2,6,"","wss2"],[2,7,"","wss2"],[2,8,"","wss2"],[2,9,"","wss2"],[2,10,"","wss2"],[4,2,"=SPARKLINE(Countries!DATA,\"splineArea\",\"#6666FF\")",""],[7,2,"You can use values and ranges from different sheets",""],[8,3,"value",""],[8,4,"=Countries!A4 & \" \" &  Countries!B4 & \"mil\"",""],[9,3,"range",""],[9,4,"=SUM(Countries!B2:B3)",""],[10,3,"named range",""],[10,4,"=SUM(Countries!DATA)",""],[13,2,"You can reference formula results from different sheets",""],[13,3,"base",""],[13,4,"2",""],[14,3,"result",""],[14,4,"=Data!B8*D13","wss3"]],"locked":[],"editors":[["2","4",{"editor":"richselect","options":"Countries!NAMES"}]],"filters":[],"formats":[]}},{"name":"Data","content":{"conditions":[],"sizes":[],"styles":[["wss1",";;;;;;;;;wrap;;;;;;"],["wss2",";;;;;;;;;nowrap;;;;;;"]],"spans":[[8,3,4,1]],"ranges":[],"table":{"frozenColumns":0,"frozenRows":0,"gridlines":1,"headers":1},"data":[[2,2,"1",""],[2,3,"=B2*2+1",""],[3,2,"=C2*3-2",""],[3,3,"=B3*2+1",""],[4,2,"=C3*3-2",""],[4,3,"=B4*2+1",""],[5,2,"=C4*3-2",""],[5,3,"=B5*2+1",""],[6,2,"=C5*3-2",""],[6,3,"=B6*2+1",""],[7,2,"=C6*3-2",""],[7,3,"=B7*2+1",""],[8,2,"=SUM(Countries!DATA)  / C7",""],[8,3,"<- uses math from this and from Countries sheet","wss2"],[8,4,"","wss2"],[8,5,"","wss2"],[8,6,"","wss2"]],"locked":[],"editors":[],"filters":[],"formats":[]}},{"name":"Countries","content":{"conditions":[],"sizes":[],"styles":[["wss1",";;right;;;;;;;;;;;;;"],["wss2",";#4a86e8;;;;;;;;;;;;;;"],["wss3","#ffffff;#4a86e8;;;;;;;;;;;;;;"]],"spans":[],"ranges":[["DATA","B2:B7"],["NAMES","A2:A7"]],"table":{"frozenColumns":0,"frozenRows":0,"gridlines":1,"headers":1},"data":[[1,1,"Name","wss3"],[1,2,"Population","wss3"],[2,1,"Belarus",""],[2,2,"9","wss1"],[3,1,"Russia",""],[3,2,"146","wss1"],[4,1,"USA",""],[4,2,"324","wss1"],[5,1,"Germany",""],[5,2,"82","wss1"],[6,1,"China",""],[6,2,"1381","wss1"],[7,1,"India",""],[7,2,"1311","wss1"]],"locked":[],"editors":[],"filters":[],"formats":[]}}];
</script>