Import from Excel, JavaScript Programming Example of Import from Excel in SpreadSheet

JavaScript Programming Example of Import from Excel in SpreadSheet

This programming example allows web developers to enable the import of data from Excel to Webix SpreadSheet. Feel free to download this JavaScript coding sample.

JS Code

webix.ready(function(){
  var buttons = {
    width:200, 
    rows:[
      { view:"uploader", value:"Load from Excel file", on:{
        onBeforeFileAdd: function(upload){
          $$("ss1").reset();
          $$("ss1").parse(upload.file, "excel");
          return false;
        }
      }},
      { view:"button", value:"Save to Excel file", click:function(){
        webix.toExcel("ss1");
      }},
      {}
    ]
  };
  
  webix.ui({
    cols:[ 
      buttons, 
      {
        id:"ss1",
        view:"spreadsheet",
        url: "binary->https://docs.webix.com/samples/65_spreadsheet/common/test.xlsx",
        datatype:"excel",
        toolbar:"full"
      }
    ]
  });
});