Skip to end of metadata
Go to start of metadata

Scripting is a unique feature in SpreadsheetLIVE. It allows users to integrate own javascript codes with SpreadsheetLIVE. For example screenshot below shows a script based form added to a workbook. It allows user to add stock symbols and select a refresh frequency. After pressing Apply button, it connects to an online data source to query stock data in real time and paste results into a target range. The stock data can then be references in the workbook to perform calculations or generate reports.

SpreadsheetLIVE includes a script editor for writing or modifying the code associated with a script.

SpreadsheetLive scripting kit named "SheetSDK" allows developers to control spreadsheet by javascript and contains most of the form controls in addition to window frame. Its really hard to explain all capabilities of SheetSDK in a single article. But this article will give you an introduction.

Before going into the details of SheetSDK, lets create a simple "Hello" script.

  • Login To SpreadsheetLive
  • Create an empty workbook
  • Click to Script menu and then Script Editor

Probably, you will see the lines below:

Main:function(APP)
{
alert('Hello');
}

Give a name for your application, enter some details about it and click to "Try Script".. You'll get a simple "Hello" message. Yes, It was easy!

SpreadsheetLive scripting system brings the power of "nature" javascript with SheetSDK. You can access listen and integrate with every part of the workbook. Simply come up with your idea and put all parts together with SheetDSK. We have created SheetSDK for users familiar with the object oriented code environment. Every script application you created runs under its own application hood. SheetSDK manages applications and their UI garbages. So, it is very simple to manage browser garbage through the SheetSDK. There are still some rules to create more efficient script applications but the management pools of SheetSDK provides a good way to create them.

Lets create our first window based script. Change the codes above with the codes below.

Main:function(APP)
{
var frmMain = new WebForm(APP, 'MyWindow');
frmMain.MoveTo(100,100);
frmMain.ResizeTo(200,100);
frmMain.Title("My First Window");

var btnSample = new WebButton("btnSample");
frmMain.AddControl(btnSample);
btnSample.MoveTo(10,10);
btnSample.ResizeTo(100,25);
btnSample.Text("Click Me");

btnSample.OnClick = function (sender, ev)
{
alert("you have clicked to button!");
}

frmMain.Show();
}

As you can see in the codes (and screenshot), we have created a window, added a button and linked "OnClick" event with the button control.  Please refer to the SheetSDK document from the link here for more information.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.