Home > Scripting > Control Spreadsheets with Java Script++

Control Spreadsheets with Java 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.

Let us know your thoughts and feedback!

Advertisement
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.