SpreadJS Documentation
workbook Method
GC.Spread.Sheets.FormulaTextBox Namespace > FormulaTextBox class : workbook Method
The Workbook component.
Gets or sets the Workbook component to work with the formula text box.
Syntax
var instance = new GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(host, options);
var returnValue; // Type: object
returnValue = instance.workbook(value);
function workbook( 
   value : object
) : object;

Parameters

value
The Workbook component.

Return Value

If no value is set, returns the workbook component; otherwise, there is no return value.
Example
This example adds a formula text box control to the page.
<!DOCTYPE html>
<html>
<head>
    <title>SpreadSheets</title>
<link href="./css/gc.spread.sheets.12.0.0.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./scripts/gc.spread.sheets.all.12.0.0.min.js"></script>

<script type="text/javascript">
window.onload = function(){
                var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
                var activeSheet = spread.getActiveSheet(); 
activeSheet.setArray(0, 0, [1, 2, 3, 4, 5]);
var fbx = new GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(document.getElementById("formulaTextBox"));
fbx.workbook(spread);
                      }
    </script>
</head>
<body>
<div id="ss" style="height: 500px; width: 600px"></div>
 <input type="text" id="formulaTextBox" />
</body>
</html>
See Also

Reference

FormulaTextBox class