Monday 28 July 2014

AngularJs + SpreadJs Integration

Hi guys,

This tutorial going to teach you basic and standard integration of these two framework that any beginner can begin with. The very useful and most important integration and the way of working angularJs with spreadJs you gonna see in this very essential tutorial.

Assumption : 
I am assuming that you know how to integrate required Js files in your basic HTML page and know some of basics of angular.js, so I am directly jumping on to the core part of the code.

Here we are not going dig deep down detail part of any of above Js frameworks but will see basic working by example.

There are two ways that you can integrate SpreadJs with AngularJs.
  1. via Div tags
  2. via wij-spread tags

The first one is very simple as following :

 <div id = "spreadContainer"></div>

And then writing following script to create spreadsheet in this container :

  <script type="text/javascript">
      $(document).ready(function(){
             $("#spreadContainer").wijspread({ sheetCount : 2 });
             var sheet = $("#spreadContainer").wijspread("spread");
             var activesheet = sheet.getActiveSheet();
      });
  </script>

And you are done, as simple, isn't it?

Now, let's move to the second part for which this tutorial is focusing on.

<div ng-view></div>          

To load your multiple spreadsheets.


Coming soon...