[{"id":"ff9bd47a-cd46-472d-af43-366f35920ef1","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"f674ca00-4cf2-4f53-9a08-4aa596ff5f02","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"5f9ed446-5e43-4e35-b070-bbedb3095625","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"c8f61bda-f911-4c26-aa5c-cf046d91d345","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"ffcf2b4f-0e46-41d0-b0b7-0cc510a2a482","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"4200be12-4188-42f3-9cf4-5fcaebbc57f7","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7bc4edb3-af3c-4fe3-8820-973c7b43d825","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"af815243-c00f-4782-b362-bb52a9129e99","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"bd8aaf4e-1ba8-4025-8ba9-d57cfbefbc58","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"874f311d-9a12-4e41-9c01-e7aaa99ab496","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"5811b0f0-9142-4dec-87d5-11fbd1e001ec","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"cef428a7-3494-4942-81f6-6712e4b9d1e7","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"3be03770-5428-4ad4-8ebc-09708a22e209","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"563145bf-65b2-4718-851d-594d1b9cf1f6","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"b273295a-e4a0-45ad-be8a-5c3a2322d22c","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"76f8df3f-5d71-4244-8fa6-6be30e10170f","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7990d3f5-9c4c-4c37-9a96-7e7b1cf0e531","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"a5d052e6-ac14-4b26-b51d-2042af4bd88c","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"4a6e9860-0849-40aa-8cdb-c16c5fb52ef4","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"b02661dd-4bf2-4e6a-94c0-c85827e19c52","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"06c9877a-acd0-49b6-8a35-52d10c942e21","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"b9cc95e6-4c7e-4ae6-9168-6270c8b9df48","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"81742c3e-102a-44f5-8e12-83cdddf79651","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"f6568a5c-eb38-4edb-af3a-8af10e64b122","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"f30f3e16-1db8-48eb-b7a8-de189c306e42","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"c38d9bd1-ec29-4861-bea2-e9939a1d40b8","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"c7f7e6eb-630d-4851-ab1a-eeafb6882ff9","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"e82078d4-d506-4d51-83ea-129c35f610c2","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"2cf396a7-8e6d-4ece-867e-2a346c855b76","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7fdf2b77-d2f1-440f-8bde-79873ae161be","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"4bfbb7a7-db6a-4e62-9bb9-043090f29e06","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"4acb1bbe-766a-4271-a1e7-156999bf6da7","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"e2476b8f-2102-441c-9f8c-bbd9ca5f94c8","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"eeba73bc-77fb-4e4c-addd-f365b53e009b","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"604aae49-9273-455c-813b-c2c97aa713c7","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"fd995bda-fac2-4ef5-ab75-d8f6840b937a","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"24dbdbdf-1539-4e43-8f9f-036adaf28f36","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"6896e627-8625-484c-9487-48803c13019b","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"035cce7b-7cfc-405b-b003-419583668944","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"139bcd73-12b9-4e78-843c-dd63933e35b8","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"f38fe005-cfd6-4f25-9c83-f5a545aaa911","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"5fa9f1d8-ed73-4642-82cd-cb4f7a9a145a","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"09b280d0-fc2f-438a-8d57-e87c6ef02d8b","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]}]
SpreadJSサブライブラリをロードすることで、すべてのライブラリをロードしなくても特定の機能を使用できます。
機能 | ライブラリ |
---|---|
コア | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js |
計算エンジン | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js |
基本的な計算機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.calcengine.basicfunctions.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js |
高度な計算機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.calcengine.advancedfunctions.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js |
自動マージ | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.automerge.xx.x.x.min.js |
データバインド機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.bindings.xx.x.x.min.js |
ドラッグアンドフィル機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.fill.xx.x.x.min.js |
フィルタ機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.conditionalformatting.xx.x.x.min.js gc.spread.sheets.filter.xx.x.x.min.js |
数式テキストボックス機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.formulatextbox.xx.x.x.min.js |
ピクチャおよびフローティングオブジェクト機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.floatingobjects.xx.x.x.min.js |
範囲グループ機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.outlines.xx.x.x.min.js |
タッチ操作機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.touch.xx.x.x.min.js |
印刷機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.print.xx.x.x.min.js |
セル型およびカスタムセル型機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.celltypes.xx.x.x.min.js |
セルの状態 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.cellstate.xx.x.x.min.js |
コメント機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.comments.xx.x.x.min.js |
条件付き書式機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.conditionalformatting.xx.x.x.min.js |
データ検証機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.conditionalformatting.xx.x.x.min.js gc.spread.sheets.datavalidation.xx.x.x.min.js |
検索機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.search.xx.x.x.min.js |
スパークライン機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.calcengine.basicfunctions.xx.x.x.min.js gc.spread.calcengine.advancedfunctions.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.sparklines.xx.x.x.min.js |
テーブル機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js(オプション) gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.bindings.xx.x.x.min.js(オプション) gc.spread.sheets.conditionalformatting.xx.x.x.min.js(オプション) gc.spread.sheets.filter.xx.x.x.min.js(オプション) gc.spread.sheets.tables.xx.x.x.min.js |
チャート機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.bindings.xx.x.x.min.js(オプション) gc.spread.sheets.charts.xx.x.x.min.js |
テーブルシート機能 | gc.spread.common.xx.x.x.js gc.spread.calcengine.xx.x.x.js gc.data.xx.x.x.js gc.spread.sheets.core.xx.x.x.js gc.spread.sheets.calcengine.xx.x.x.js gc.spread.sheets.bindings.xx.x.x.js gc.spread.sheets.tables.xx.x.x.js gc.spread.sheets.automerge.xx.x.x.js gc.spread.sheets.cellstate.xx.x.x.js gc.spread.sheets.statusbar.xx.x.x.js gc.spread.sheets.conditionalformatting.xx.x.x.js gc.spread.sheets.filter.xx.x.x.js gc.spread.sheets.tablesheet.xx.x.x.js |
ドラッグマージ機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.dragmerge.xx.x.x.min.js |
アウトライン列機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.outlinecolumn.xx.x.x.min.js |
コンテキストメニュー機能 | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.contextmenu.xx.x.x.min.js gc.spread.sheets.bindings.xx.x.x.min.js(オプション) |
gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.pdf.xx.x.x.min.js | |
スライサーコンポーネント機能 | gc.spread.common.xx.x.x.min.js |
スライサー機能 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.conditionalformatting.xx.x.x.min.js gc.spread.sheets.filter.xx.x.x.min.js gc.spread.sheets.tables.xx.x.x.min.js gc.spread.sheets.floatingobjects.xx.x.x.min.js gc.spread.sheets.slicers.xx.x.x.min.js |
バーコード | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x..min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.sparklines.xx.x.x.min.js gc.spread.sheets.barcode.xx.x.x.min.js |
図形 | gc.spread.common.xx.x.x.min.js gc.spread.calcengine.xx.x.x.min.js gc.spread.sheets.calcengine.x.x.x.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.floatingobjects.xx.x.x.min.js gc.spread.sheets.shapes.xx.x.x.min.js |
ハイパーリンク | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.hyperlink.xx.x.x.js |
名前ボックス | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.namebox.xx.x.x.js |
ステータスバー | gc.spread.common.xx.x.x.min.js gc.spread.sheets.core.xx.x.x.min.js gc.spread.sheets.statusbar.xx.x.x.js |
core js は常にロードする必要があります。 関数を使用するには、calcengine jsを最初にロードする必要があります。 calcengine jsは多くの機能によって使用されるため、最初にロードしておきます。ロードされていないjsファイルの関数を使用した場合、この関数は無効になります。
各jsファイルは、メインのSpreadJSスクリプトフォルダの下の、pluggableフォルダに保管されています。
次のサンプルコードは、SpreadJSの基本機能を使用します。
<!DOCTYPE html>
<html>
<head>
<title>Spread.Sheets Pluggable Sample</title>
<link type="text/css" href="./css/gc.spread.sheets.xx.x.x.css" rel="stylesheet"/>
<!--Spread.Sheets pluggable common function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.common.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable core function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.core.xx.x.x.min.js"></script>
<script>
// Spread.Sheetsの定義とほとんどのUI動作は、Spread.Sheetsコアライブラリ内に定義されています。
window.onload = function () {
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var sheet = spread.getActiveSheet();
sheet.setValue(0, 0, 20);
};
</script>
</head>
<body>
<div id="ss" style="width:800px; height:600px; border: 1px solid gray;"></div>
</body>
</html>
次のサンプルコードは、基本的な計算機能を使用します。
<!DOCTYPE html>
<html>
<head>
<title>Spread.Sheets Pluggable Sample</title>
<link type="text/css" href="./css/gc.spread.sheets.xx.x.x.css" rel="stylesheet"/>
<!--Spread.Sheets pluggable common function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.common.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable calcengine function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.calcengine.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable calcengine basic function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.calcengine.basicfunctions.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable core function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.core.xx.x.x.min.js"></script>
<script>
window.onload = function () {
//コアおよび基本の計算機能は、Spread.Sheets calcライブラリ内にあります。
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var sheet = spread.getActiveSheet();
sheet.setArray(0, 0, [1, 2, 3, 4, 5]);
sheet.setFormula(5, 1, 'SUM(A1,A5)');
};
</script>
</head>
<body>
<div id="ss" style="width:800px; height:600px; border: 1px solid gray;"></div>
</body>
</html>
次のサンプルコードは、計算機能と高度な機能を使用します。
<!DOCTYPE html>
<html>
<head>
<title>SpreadJS Pluggable Sample</title>
<link type="text/css" href="./css/gc.spread.sheets.x.x.x.css" rel="stylesheet"/>
<!--SpreadJS pluggable common function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.common.x.x.x.min.js"></script>
<!--SpreadJS pluggable calcengine function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.calcengine.x.x.x.min.js"></script>
<!--SpreadJS pluggable calcengine advanced function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.calcengine.advancedfunctions.x.x.x.min.js"></script>
<!--SpreadJS pluggable core function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.core.x.x.x.min.js"></script>
<script>
window.onload = function () {
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var activeSheet = spread.getActiveSheet();
activeSheet.setValue(0, 0, 1);
activeSheet.setValue(1, 0, 10);
activeSheet.setValue(2, 0, 7);
activeSheet.setValue(3, 0, 9);
activeSheet.setValue(4, 0, "a1");
activeSheet.setFormula(5, 0, "MAX(A1:A5)");
};
</script>
</head>
<body>
<div id="ss" style="width:800px; height:600px; border: 1px solid gray;"></div>
</body>
</html>
次のサンプルコードは、バインド機能を使用します。
<!DOCTYPE html>
<html>
<head>
<title>Spread.Sheets Pluggable Sample</title>
<link type="text/css" href="./css/gc.spread.sheets.xx.x.x.css" rel="stylesheet"/>
<!--Spread.Sheets pluggable common function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.common.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable core function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.core.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable data binding library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.bindings.xx.x.x.min.js"></script>
<script>
window.onload = function () {
//データバインド関連機能はSpread.Sheets bindingライブラリ内にあります。
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var activeSheet = spread.getActiveSheet();
var people = [
{ name: "Albert", isAdult: false, country: "American", website: "albert.com" },
{ name: "Alice", isAdult: true, country: "China", website: "alice.com" },
{ name: "Bob", isAdult: false, country: "Canada", website: "bob.com" }
];
activeSheet.autoGenerateColumns = true;
activeSheet.setDataSource(people);
};
</script>
</head>
<body>
<div id="ss" style="width:800px; height:600px; border: 1px solid gray;"></div>
</body>
</html>
次のサンプルコードは、数式テキストボックス機能を使用します。
<!DOCTYPE html>
<html>
<head>
<title>Spread.Sheets Pluggable Sample</title>
<link type="text/css" href="./css/gc.spread.sheets.xx.x.x.css" rel="stylesheet"/>
<!--Spread.Sheets pluggable common function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.common.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable calcengine function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.calcengine.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable core function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.core.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable formula text box function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.formulatextbox.xx.x.x.min.js"></script>
<script>
// 数式テキストボックス機能はSpread.Sheets commentライブラリ内にあります。
window.onload = function () {
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var sheet = spread.getActiveSheet();
sheet.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="width:800px; height:600px; border: 1px solid gray;"></div>
<input type="text" id="formulaTextBox" />
</body>
</html>
次のサンプルコードは、コメント関数を使用します。
<!DOCTYPE html>
<html>
<head>
<title>Spread.Sheets Pluggable Sample</title>
<link type="text/css" href="./css/gc.spread.sheets.xx.x.x.css" rel="stylesheet"/>
<!--Spread.Sheets pluggable common function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.common.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable core function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.core.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable comment library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.comments.xx.x.x.min.js"></script>
<script>
window.onload = function () {
//コメント機能はSpread.Sheets commentライブラリ内にあります。
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var activeSheet = spread.getActiveSheet();
var comment = new GC.Spread.Sheets.Comments.Comment();
comment.text("new comment!");
comment.backColor("yellow");
comment.foreColor("green");
comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
activeSheet.getCell(5,5).comment(comment);
};
</script>
</head>
<body>
<div id="ss" style="width:800px; height:600px; border: 1px solid gray;"></div>
<input type="text" id="formulaTextBox" />
</body>
</html>
次のサンプルコードは、フロートオブジェクト機能を使用します。
<!DOCTYPE html>
<html>
<head>
<title>Spread.Sheets Pluggable Sample</title>
<link type="text/css" href="./css/gc.spread.sheets.xx.x.x.css" rel="stylesheet"/>
<!--Spread.Sheets pluggable common function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.common.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable core function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.core.xx.x.x.min.js"></script>
<!--Spread.Sheets pluggable floating objects function library-->
<script type="text/javascript" src="./scripts/pluggable/gc.spread.sheets.floatingobjects.xx.x.x.min.js"></script>
<script>
window.onload = function () {
//カスタムフローティングオブジェクト/ピクチャ機能はSpread.Sheets floatingobjectライブラリ内にあります。
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var activeSheet = spread.getActiveSheet();
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 100, 100, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
};
</script>
</head>
<body>
<div id="ss" style="width:800px; height:600px; border: 1px solid gray;"></div>
<input type="text" id="formulaTextBox" />
</body>
</html>