Commit e282b08a authored by Thibaut Frain's avatar Thibaut Frain

Added simple spreadsheet (jquery.sheet) view

parent 545e3f75
......@@ -262,3 +262,8 @@ a.confirm, a.action {
.navbar ul li a.ui-btn-active.clone_item span.navbar_clone {
font-weight: bold;
}
div.ui-content > iframe {
height: 1000px;
min-width: 1300px;
}
\ No newline at end of file
......@@ -77,6 +77,14 @@
<h3>Login</h3>
</a>
</li>
<li data-role="list-divider">New document</li>
<li class="listview_item listview_icon">
<a href="#/spreadsheet/">
<span class="ui-li-icon ui-li-icon-custom ui-icon-folder-open-alt ui-icon"
>&nbsp;</span>
<h3>Spreadsheet</h3>
</a>
</li>
<li data-role="list-divider">General</li>
<li class="listview_item listview_icon">
<a href="#/about/">
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="-1"/>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
<meta content="utf-8" http-equiv="encoding"/>
<title>Spreadsheet</title>
<link rel="stylesheet" type="text/css" href="../lib/jquery.sheet/jquery.sheet.css">
<link rel="stylesheet" type="text/css" href="../lib/jquery.sheet/jquery-ui/theme/jquery-ui.min.css">
<script type="text/javascript" src="../lib/jquery.sheet/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../lib/jquery.sheet/plugins/globalize.js"></script>
<script type="text/javascript" src="../lib/jquery.sheet/parser/formula/formula.js"></script>
<script type="text/javascript" src="../lib/jquery.sheet/parser/tsv/tsv.js"></script>
<script type="text/javascript" src="../lib/jquery.sheet/jquery.sheet.min.js"></script>
<!--Page styles-->
<style>
body {
background-color: #464646;
padding: 0px;
margin: 0px;
padding-bottom: 100px;
color: black;
font-family: sans-serif;
font-size: 13px;
}
.wrapper {
margin: 10px;
background-color: #CCCCCC;
}
.locked {
position: fixed;
top: expression(eval(document.body.scrollTop) + "px");
left: 20px;
}
#lockedMenu
{
width: 225px;
background-image: none;
}
#lockedMenu * {
font-size: .95em ! important;
text-decoration: none;
}
#header {
text-align: left;
font-size: 1.5em;
padding: 18px;
border: none;
padding-left: 150px;
}
#footer {
text-align: center;
color: white;
font-size: .9em;
}
#footer a {
font-size: 1.2em;
color: #FFFFFF;
}
</style>
</head>
<body>
<h1 id="header" class="ui-state-default">
<a href="http://visop-dev.com/Project+jQuery.sheet">
<img src="images/logo.png" style="position: absolute;top: -20px; left: 20px; border: none;" />
jQuery.sheet - The Ajax Spreadsheet, Demo
</a>
<br />
<span id="themeSwitcher"></span>
</h1>
<div id="mainWrapper" class="ui-corner-all wrapper">
<div id="sheet" class="jQuerySheet" style="height: 450px;"></div>
</div>
<script type="text/javascript">
$('#sheet').sheet().getSheet().newSheet();
</script>
</body>
</html>
......@@ -50,6 +50,14 @@
g.declareGadget('./login.html', main_context)
.then(enhanceGadgetRendering);
});
body
.route("add", "/spreadsheet/", 1)
.done(function () {
g.declareIframedGadget('./spreadsheet.html', main_context)
.then(enhanceGadgetRendering);
});
}
g.declareGadget('./io.html', g.context.find("iogadget"))
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function(){
var me = $('#sheetParent').sheet(),
jS = me.getSheet(),
tests = $('#tests'),
proceed = true,
i = 0,
test = function (name, fn, fnExpected) {
i++;
if (proceed == false)
{
return;
}
$('<tr></tr>')
.appendTo(tests)
.append('<td>' + i + ' : ' + name + '</td>')
.append('<td>' + fnExpected(fn()) + '</td>');
proceed = confirm('Proceed with next test?');
},
tdAtPos = function(td, rowIndex, cellIndex) {
console.log(td);
if (
td[0].cellIndex == cellIndex &&
td[0].parentNode.rowIndex == rowIndex) {
return true;
} else {
return false;
}
},
getCell = function (sheet, row, col) {
var cell = jS.spreadsheets[sheet][row][col];
return cell;
},
setFormula = function (sheet, row, col, val, fn) {
fn = fn || function () {};
var cell = getCell(sheet, row, col);
cell.formula = val;
cell.calcLast = 0;
fn(cell);
jS.updateCellValue(sheet, row, col);
},
setValue = function (sheet, row, col, val, fn) {
fn = fn || function () {};
var cell = getCell(sheet, row, col);
cell.value = val;
cell.calcLast = 0;
fn(cell);
jS.updateCellValue(sheet, row, col);
},
td = jS.obj.table().find('td').last().css('background-color', 'yellow');
test('Adding cells to end', function () {
jS.controlFactory.addRow();
jS.controlFactory.addColumn();
}, function () {
console.log(jS.obj.table().find('td').length);
if (tdAtPos(td, 1, 1) && jS.obj.table().find('td').length == (3 * 3)) {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Adding cells before first cell', function () {
jS.controlFactory.addRow(1, true);
jS.controlFactory.addColumn(1, true);
}, function () {
if (tdAtPos(td, 2, 2) && jS.obj.table().find('td').length == (4 * 4)) {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Adding cells after first cell, but before end', function () {
jS.controlFactory.addRow(2);
jS.controlFactory.addColumn(2);
}, function () {
if (
tdAtPos(td, 2, 2) &&
tdAtPos(jS.obj.table().find('td').last(), 4, 4) &&
jS.obj.table().find('td').length == (5 * 5)
) {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Deleting cells at beginning', function () {
jS.deleteRow(1);
jS.deleteColumn(1);
}, function () {
console.log(tdAtPos(td, 1, 1));
console.log(jS.obj.table()[0]);
if (
tdAtPos(td, 1, 1) &&
jS.obj.table().find('td').length == (4 * 4)
) {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Deleting cells at end', function () {
var size = jS.sheetSize();
jS.deleteRow(size.rows);
jS.deleteColumn(size.cols);
}, function () {
if (
tdAtPos(td, 1, 1) &&
jS.obj.table().find('td').length == (3 * 3)
) {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Shift formulas down between dependency and dependent', function() {
me.html($.sheet.makeTable({rows: 2, cols: 2})).sheet();
jS = me.getSheet();
setValue(0, 2, 2, '100');
setFormula(0, 1, 1, 'B2');
jS.controlFactory.addRow(1);
jS.controlFactory.addColumn(1);
}, function() {
var cell = jS.spreadsheets[0][1][1];
if (cell.formula == 'C3') {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Shift formulas up between dependency and dependent', function() {
jS.deleteRow(2);
jS.deleteColumn(2);
}, function() {
var cell = jS.spreadsheets[0][1][1];
if (cell.formula == 'B2') {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Shift formulas down before dependency and dependent', function() {
jS.controlFactory.addRow(1, true);
jS.controlFactory.addColumn(1, true);
}, function() {
var cell = jS.spreadsheets[0][2][2];
if (cell.formula == 'C3') {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Shift formulas up before dependency and dependent', function() {
jS.deleteRow(1);
jS.deleteColumn(1);
}, function () {
var cell = jS.spreadsheets[0][1][1];
if (cell.formula === 'B2') {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Disappearing dependency', function () {
jS.controlFactory.addRow(1);
jS.controlFactory.addColumn(1);
setFormula(0, 1, 1, 'B2');
jS.deleteRow(2);
jS.deleteColumn(2);
jS.controlFactory.addRow(1);
jS.controlFactory.addColumn(1);
jS.deleteRow(2);
jS.deleteColumn(2);
}, function () {
var cell = jS.spreadsheets[0][1][1];
if (cell.formula === '#REF!#REF!') {
return 'SUCCESS';
}
return 'FAILURE';
});
test('Insert row after a dependency the is positioned after the row and dependency', function() {
me.html($.sheet.makeTable({rows: 25, cols: 5})).sheet();
jS = me.getSheet();
setValue(0, 5, 1, 100);
setFormula(0, 8, 3, 'A5');
td = jS.obj.table().find('tr:eq(6) td:eq(1)').css('background-color', 'yellow');
jS.controlFactory.addRow(5);
jS.controlFactory.addColumn(1);
}, function() {
var cell = jS.spreadsheets[0][9][4];
if (cell.formula === 'A5') {
return 'SUCCESS';
}
return 'FAILURE';
});
});
</script>
</head>
<body>
<table style="width: 100%;">
<tr>
<td style="width: 50%;">
<table id="tests">
<tr>
<th>Test Name</th>
<th>Result</th>
</tr>
</table>
</td>
<td>
<div id="sheetParent">
<table>
<tr>
<td></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Cell Types">
<table>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
var data = tsv.parse("Density Viscosity Temperature\n\
0.457 3.55 500\n\
0.525 3.25 400\n\
0.616 2.93 300\n\
0.675 2.75 250\n\
0.746 2.57 200\n\
0.835 2.38 150\n\
0.946 2.17 100\n\
1.09 1.95 50\n\
1.29 1.71 0"),
table = document.createElement('table'),
tr,
td,
row,
col;
table.setAttribute('title', 'Lookup Data');
while(data.length) {
row = data.shift();
tr = document.createElement('tr');
table.appendChild(tr);
while(row.length) {
col = row.shift();
td = document.createElement('td');
td.innerHTML = col;
tr.appendChild(td);
}
}
$('#sheetParent')
.append(table)
.sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Cell Lookup">
<table title="Test">
<tr>
<td class="styleBold styleCenter">Function</td>
<td class="styleBold styleCenter">Execution</td>
<td class="styleBold styleCenter">Desired Result</td>
<td class="styleBold styleCenter">Correct?</td>
<td class="styleBold styleCenter">Notes</td>
</tr>
<tr>
<td>VLOOKUP</td>
<td data-formula="VLOOKUP(1,SHEET2!A2:C10,2)"></td>
<td>2.17</td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>VLOOKUP</td>
<td data-formula="=VLOOKUP(1,SHEET2!A2:C10,3,TRUE)"></td>
<td>100</td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>VLOOKUP</td>
<td data-formula="=VLOOKUP(0.7,SHEET2!A2:C10,3,FALSE)"></td>
<td></td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>VLOOKUP</td>
<td data-formula="VLOOKUP(0.1,SHEET2!A2:C10,2,TRUE)"></td>
<td>1.71</td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>HLOOKUP</td>
<td data-formula="HLOOKUP('Density',SHEET2!A1:C10,2,TRUE)"></td>
<td>0.457</td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>HLOOKUP</td>
<td data-formula="HLOOKUP('Viscosity',SHEET2!A1:C10,1,TRUE)"></td>
<td>Viscosity</td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>HLOOKUP</td>
<td data-formula="HLOOKUP('Temperature',SHEET2!A1:C10,6,TRUE)"></td>
<td>200</td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>HLOOKUP</td>
<td data-formula="HLOOKUP('Test',SHEET2!A1:C10,2,TRUE)"></td>
<td></td>
<td data-formula="IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet({
allowCellsLineBreaks: false
});
});
</script>
</head>
<body>
<div id="sheetParent" title="Cell Value Behavior">
<table title="Cell Value Behaviour">
<tbody>
<tr>
<td class="styleBold styleCenter">Function</td>
<td class="styleBold styleCenter">Execution</td>
<td class="styleBold styleCenter">Desired Result</td>
<td class="styleBold styleCenter">Correct?</td>
<td class="styleBold styleCenter">Notes</td>
</tr>
<tr>
<td>Bracket Handling</td>
<td data-formula="='<b>b</b>'"></td>
<td>&lt;b&gt;b&lt;/b&gt;</td>
<td data-formula="=IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>Concat with format</td>
<td data-formula="=CONCATENATE('Dollar Amount: ',DOLLAR(SUM(200)))"></td>
<td>Dollar Amount: 200</td>
<td data-formula="=IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td>For now concatenation makes formatting cells somewhat difficult, so for the time being the formatting is lost on concatenation. Same as example below.</td>
</tr>
<tr>
<td>Concat operator with format</td>
<td data-formula="='Dollar Amount: ' + DOLLAR(SUM(200))"></td>
<td>Dollar Amount: 200</td>
<td data-formula="=IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>Line Breaks</td>
<td data-formula="='Test
Test'"></td>
<td>Test
Test</td>
<td data-formula="=IF(THISROWCELL('B') = THISROWCELL('C'), TRUE, FALSE)"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Cell Types">
<table>
<tr>
<td>Cell Type</td>
<td>Formatted Result</td>
</tr>
<tr>
<td>None</td>
<td>9999</td>
</tr>
<tr>
<td>Number</td>
<td data-celltype="currency">9999</td>
</tr>
<tr>
<td>Date</td>
<td data-celltype="date">1/1/2001</td>
</tr>
<tr>
<td>Number</td>
<td data-celltype="number">100</td>
</tr>
<tr>
<td>Percent</td>
<td data-celltype="percent">.2344</td>
</tr>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet({
hiddenRows: [[1,2]],
hiddenColumns: [[3,4]]
});
});
</script>
</head>
<body>
<div id="sheetParent" title="Hidden Cells">
<table data-hiddenrows="1,2" data-hiddencolumns="3,4" title="Hidden Cells">
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Merged Cells">
<table title="Merged Cells">
<tr>
<td rowspan="2" colspan="2">Merged</td>
<td style="display: none;"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Charts">
<table style="width: 1401px; " title="Charts" class="jSheet ui-widget-content" id="jSheet_0_0" border="1px" cellpadding="0" cellspacing="0">
<colgroup>
<col style="width: 243px; "/>
<col style="width: 204px; "/>
<col style="width: 594px; "/>
<col style="width: 120px; "/>
<col style="width: 120px; "/>
<col style="width: 120px; "/>
</colgroup>
<tbody>
<tr style="height: 18px;">
<td class="styleBold styleCenter">Chart Type</td>
<td class="styleBold styleCenter">Example</td>
<td class="styleBold styleCenter">Chart</td>
<td class="styleBold styleCenter">Sample Data</td>
<td class="styleBold styleCenter">Sample Legends</td>
<td class="styleBold styleCenter">Sample Years</td>
</tr>
<tr style="height: 256px;">
<td>Simple Vertical Bar Chart</td>
<td>"=BARCHART(D2:D8)"</td>
<td class="styleCenter" data-formula="=BARCHART(D2:D8)"></td>
<td>1</td>
<td>Nov</td>
<td>2006</td>
</tr>
<tr style="height: 215px;">
<td>Simple Horizontal Bar Chart</td>
<td>"=HBARCHART(D2:D8)"</td>
<td class="styleCenter" data-formula="=HBARCHART(D2:D8)"></td>
<td>2</td>
<td>Dec</td>
<td>2007</td>
</tr>
<tr style="height: 167px;">
<td>Simple Line Chart</td>
<td>"=LINECHART(D2:D8, F2:F6)"</td>
<td class="styleCenter" data-formula="=LINECHART(D2:D8, F2:F6)"></td>
<td>5</td>
<td>Mar</td>
<td>2008</td>
</tr>
<tr style="height: 212px;">
<td>Simple Pie Chart</td>
<td>"=PIECHART(D2:D8)"</td>
<td class="styleCenter" data-formula="=PIECHART(D2:D8, E2:E8)"></td>
<td>7</td>
<td>May</td>
<td>2009</td>
</tr>
<tr style="height: 22px; ">
<td></td>
<td></td>
<td class="styleCenter"></td>
<td>7.5</td>
<td>June</td>
<td>2010</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>8</td>
<td>July</td>
<td>2011</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td >8</td>
<td >August</td>
<td >2012</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Dates">
<table title="Dates">
<tbody>
<tr>
<td class="styleBold styleCenter">Function</td>
<td class="styleBold styleCenter">Execution</td>
<td class="styleBold styleCenter">Desired Result</td>
<td class="styleBold styleCenter">Correct?</td>
<td class="styleBold styleCenter">Notes</td>
</tr>
<tr>
<td>DATE</td>
<td data-formula="=DATE(2012,11,20)"></td>
<td>41233</td>
<td data-formula="=IF(B2 = C2, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>DATEVALUE</td>
<td data-formula="=DATEVALUE('11/20/2012')"></td>
<td>41233</td>
<td data-formula="=IF(B3 = C3, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>DAY</td>
<td data-formula="=DAY('11/20/2012')"></td>
<td>20</td>
<td data-formula="=IF(B4 = C4, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>DAYS360</td>
<td data-formula="=DAYS360('09/01/2012', '08/31/2013')"></td>
<td>360</td>
<td data-formula="=IF(B5 = C5, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>DAYS360</td>
<td data-formula="=DAYS360('09/01/2012', '08/31/2013', true)"></td>
<td>359</td>
<td data-formula="=IF(B6 = C6, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>EDATE</td>
<td data-formula="=EDATE('11/20/2012', 1)"></td>
<td>41263</td>
<td data-formula="=IF(B7 = C7, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>EOMONTH</td>
<td data-formula="=EOMONTH('11/20/2012', 1)"></td>
<td>41274</td>
<td data-formula="=IF(B8 = C8, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>HOUR</td>
<td data-formula="=HOUR(10:30AM)"></td>
<td>10</td>
<td data-formula="=IF(B9 = C9, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>MINUTE</td>
<td data-formula="=MINUTE(10:30AM)"></td>
<td>30</td>
<td data-formula="=IF(B10 = C10, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>MONTH</td>
<td data-formula="=MONTH(DATE(2012,11,20))"></td>
<td>11</td>
<td data-formula="=IF(B11 = C11, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>NOW</td>
<td data-formula="=NOW()"></td>
<td></td>
<td>Not Checkable</td>
<td></td>
</tr>
<tr>
<td>SECOND</td>
<td data-formula="=SECOND(TIME(10,30,54))"></td>
<td>54</td>
<td data-formula="=IF(B13 = C13, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>TIME</td>
<td data-formula="=TIME(9,79,660)"></td>
<td>0.4375</td>
<td data-formula="=IF(B14 = C14, TRUE, FALSE)"></td>
<td>Equal to 10:30</td>
</tr>
<tr>
<td>TIMEVALUE</td>
<td data-formula="=TIMEVALUE(10:30am)"></td>
<td>0.4375</td>
<td data-formula="=IF(B15 = C15, TRUE, FALSE)"></td>
<td>Equal to 10:30</td>
</tr>
<tr>
<td>TODAY</td>
<td data-formula="=TODAY()"></td>
<td></td>
<td>Not Checkable</td>
<td></td>
</tr>
<tr>
<td>WEEKDAY</td>
<td data-formula="=WEEKDAY('11/20/2012')"></td>
<td>3</td>
<td data-formula="=IF(B17 = C17, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>WEEKDAY</td>
<td data-formula="=WEEKDAY('11/20/2012', 2)"></td>
<td>1</td>
<td data-formula="=IF(B18 = C18, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>WEEKDAY</td>
<td data-formula="=WEEKDAY('11/20/2012', 3)"></td>
<td>2</td>
<td data-formula="=IF(B19 = C19, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>WEEKNUM</td>
<td data-formula="=WEEKNUM('11/20/2012', 3)"></td>
<td>48</td>
<td data-formula="=IF(B20 = C20, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>WORKDAY</td>
<td data-formula="=WORKDAY(DATE(2012,11,20), 1000, DATE(2013,1,1))"></td>
<td>42634</td>
<td data-formula="=IF(B21 = C21, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>YEAR</td>
<td data-formula="=YEAR('11/20/2012', 3)"></td>
<td>2012</td>
<td data-formula="=IF(B22 = C22, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>YEARFRAC</td>
<td data-formula="=YEARFRAC(DATE(2012,1,1), DATE(2012,7,1))"></td>
<td>0.5</td>
<td data-formula="=IF(B23 = C23, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>YEARFRAC</td>
<td data-formula="=YEARFRAC(DATE(2012,1,1), DATE(2012,7,1), 1)"></td>
<td>0.4972677595628415</td>
<td data-formula="=IF(B24 = C24, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>YEARFRAC</td>
<td data-formula="=YEARFRAC(DATE(2012,1,1), DATE(2012,7,1), 2)"></td>
<td>0.5055555555555555</td>
<td data-formula="=IF(B25 = C25, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>YEARFRAC</td>
<td data-formula="=YEARFRAC(DATE(2012,1,1), DATE(2012,7,1), 3)"></td>
<td>0.4986301369863014</td>
<td data-formula="=IF(B26 = C26, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>YEARFRAC</td>
<td data-formula="=YEARFRAC(DATE(2012,1,1), DATE(2012,7,1), 4)"></td>
<td>0.5</td>
<td data-formula="=IF(B27 = C27, TRUE, FALSE)"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function(){
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent">
<table>
<tr>
<td></td>
</tr>
</table>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function(){
var gC = $('#growlContainer');
function growl(msg) {
var $msg = $('<div style="background-color: #adff2f;" />').text(msg);
gC.prepend(
$msg
);
$msg.fadeOut(5000, function() {
$msg.remove();
});
}
$('#jQuerySheet0')
//Note these events don't yet work as triggers. Also, you can use them as settings as well.
.bind('sheetAddRow', function() {
growl('A row was added!');
})
.bind('sheetAddColumn', function() {
growl('A column was added!')
})
.bind('sheetSwitch', function() {
growl('A sheet was switched!')
})
.bind('sheetRename', function() {
growl('A sheet was renamed!')
})
.bind('sheetTabSortStart', function() {
growl('A sheet is starting to be sorted!')
})
.bind('sheetTabSortUpdate', function() {
growl('A sheet was sorted!')
})
.bind('sheetFormulaKeydown', function() {
growl('Formula keydown!')
})
.bind('sheetCellEdit', function() {
growl('A cell is being edited!')
})
.bind('sheetCellEdited', function() {
growl('A cell was edited!')
})
.bind('sheetCalculation', function() {
growl('A sheet was calculated!')
})
.bind('sheetAdd', function() {
growl('A sheet was added!')
})
.bind('sheetDelete', function() {
growl('A sheet was deleted!')
})
.bind('sheetDeleteRow', function() {
growl('A row was deleted!')
})
.bind('sheetDeleteColumn', function() {
growl('A column was deleted!')
})
.bind('sheetOpen', function() {
growl('A sheet was opened!')
})
.bind('sheetAllOpened', function() {
growl('All the sheets were opened in an instance!')
})
.bind('sheetSave', function() {
growl('A sheet was saved!')
})
.bind('sheetFullScreen', function() {
growl('A sheet went fullscreen!')
})
.sheet();
});
</script>
</head>
<body>
<table style="width: 100%;">
<tr>
<td style="width: 80%;vertical-align: top;">
<div id="jQuerySheet0" >
<table>
<tr>
<td></td>
</tr>
</table>
</div>
</td>
<td id="growlContainer" style="vertical-align: top;"></td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Financial">
<table title="Financial">
<tbody>
<tr>
<td class="styleBold styleCenter">Function</td>
<td class="styleBold styleCenter">Execution</td>
<td class="styleBold styleCenter">Desired Result</td>
<td class="styleBold styleCenter">Correct?</td>
<td class="styleBold styleCenter">Notes</td>
</tr>
<tr>
<td>FV</td>
<td data-formula="=FV(7.5%/12, 2*12, -250, -5000, 1)"></td>
<td>12298.46381980343</td>
<td data-formula="=IF(B2 = C2, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>IPMT</td>
<td data-formula="=IPMT(10%, 3, 3, 8000)"></td>
<td>-292.4471299093658</td>
<td data-formula="=IF(B3 = C3, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>IPMT</td>
<td data-formula="=IPMT(3.5%/4, 2, 8, 10000, 5000, true)"></td>
<td>-70.96865039555856</td>
<td data-formula="=IF(B4 = C4, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>IPMT</td>
<td data-formula="=IPMT(5%/12, 1, 60, 50000)"></td>
<td>-208.33333333333334</td>
<td data-formula="=IF(B5 = C5, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>NPER</td>
<td data-formula="=NPER(12%/12, -100, -1000, 10000, TRUE)"></td>
<td>59.67386567429457</td>
<td data-formula="=IF(B6 = C6, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>NPER</td>
<td data-formula="=NPER(12%/12, -100, -1000, 10000)"></td>
<td>60.08212285376166</td>
<td data-formula="=IF(B7 = C7, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>NPV</td>
<td data-formula="=NPV(10%, -10000, 3000, 4200, 6800)"></td>
<td>1188.4434123352207</td>
<td data-formula="=IF(B8 = C8, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>PMT</td>
<td data-formula="=PMT(8%/12, 10, 10000)"></td>
<td>-1037.0320893591604</td>
<td data-formula="=IF(B9 = C9, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>PV</td>
<td data-formula="=PV(0.075/12, 2*12, 250, 0, 0)"></td>
<td>-5555.605845933733</td>
<td data-formula="=IF(B10 = C10, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>PV</td>
<td data-formula="=PV(0.06/52, 4*52, 50, 0, 1)"></td>
<td>-9252.072719338317</td>
<td data-formula="=IF(B11 = C11, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>RATE</td>
<td data-formula="=RATE(2*12, -250, 5000)"></td>
<td>0.015130843902309656</td>
<td data-formula="=IF(B12 = C12, TRUE, FALSE)"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../', {skip: null});
$(function () {
var parent = $('#sheetParent'),
children = parent.children().clone(),
cultureSelect = $('#cultureSelect')
.change(function() {
Globalize.culture( $(this).val() );
parent
.html(children.clone())
.sheet();
});
$.each(Globalize.cultures, function (i) {
cultureSelect.append('<option value="' + i + '">' + this.englishName + ' / ' + this.nativeName + '</option>');
});
parent.sheet();
});
</script>
</head>
<body>
Language: <select id="cultureSelect"></select>
<div id="sheetParent" title="Dates">
<table title="Dates">
<tbody>
<tr>
<td class="styleBold styleCenter">Format Type</td>
<td class="styleBold styleCenter">Execution</td>
<td class="styleBold styleCenter">Desired Result</td>
<td class="styleBold styleCenter">Correct?</td>
<td class="styleBold styleCenter">Notes</td>
</tr>
<tr>
<td>DATE</td>
<td data-formula="=DATE(2012,11,20)"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>NUMBER</td>
<td data-formula="=123456789"></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Information Functions">
<table title="Information Functions">
<tbody>
<tr>
<td class="styleBold styleCenter">Function</td>
<td class="styleBold styleCenter">Execution</td>
<td class="styleBold styleCenter">Desired Result</td>
<td class="styleBold styleCenter">Correct?</td>
<td class="styleBold styleCenter">Notes</td>
</tr>
<tr>
<td>ISNUMBER</td>
<td data-formula="=ISNUMBER(100)"></td>
<td data-formula="=TRUE()"></td>
<td data-formula="=IF(B2 = C2, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>ISNUMBER</td>
<td data-formula="=ISNUMBER('test')"></td>
<td data-formula="=FALSE()"></td>
<td data-formula="=IF(B3 = C3, TRUE, FALSE)"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('<div />').load('../examples/inputs.html #sheetParent table', function() {
var $output = $('#output');
var output = function(i) {
if (!i) {
$output.children().remove();
}
$output
.append($('<tr></tr>')
.append($('<td></td>').text(this.name))
.append($('<td></td>').text(this.value))
);
};
var sheet = $('#sheetParent')
.html($(this).html())
.sheet({
sheetAllOpened: function() {
$.each($(this).serializeCellInputs(true), output);
}
});
sheet
.find(':input')
.change(function() {
$.each(sheet.serializeCellInputs(true), output);
});
});
});
</script>
</head>
<body>
<div id="sheetParent" title="Inputs"></div>
<table>
<thead>
<th>Input Name</th>
<th>Value</th>
</thead>
<tbody id="output">
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Inputs">
<TABLE title="Inputs">
<COLGROUP>
<COL width="197px" style="width: 197px; "/>
<COL width="206px" style="width: 206px; "/>
<COL width="132px" style="width: 132px; "/>
<COL width="120px" style="width: 120px; "/>
<COL width="120px" style="width: 120px; "/>
</COLGROUP>
<TBODY>
<TR height="18px" style="height: 18px;">
<TD >Inputs are for capturing fixed data, such as a drop down list (DROPDOWN), or a checkbox (CHECKBOX)</TD>
<TD></TD>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD class="styleBold" >Input Type</TD>
<TD class="styleBold" >Example</TD>
<TD class="styleBold"></TD>
<TD class="styleBold" >Data Number</TD>
<TD class="styleBold" >Data String</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD >Select List</TD>
<TD >"=DROPDOWN(D3:D10)"</TD>
<TD data-formula="=DROPDOWN(D3:D10)">4</TD>
<TD >34</TD>
<TD >Lorem</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD >Radio List</TD>
<TD >"=RADIO(E3:E10)"</TD>
<TD data-formula="=RADIO(E3:E10)">Donec</TD>
<TD >-20</TD>
<TD >Proin</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD >Checkbox</TD>
<TD >"=CHECKBOX(E3)"</TD>
<TD data-formula="=CHECKBOX(E3)">true</TD>
<TD >123</TD>
<TD >Aliquam</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD >Get Select List Value</TD>
<TD >"=C3"</TD>
<TD data-formula="=C3" >4</TD>
<TD >123</TD>
<TD >Quisque</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD >Get Radio List Value</TD>
<TD >"=C4"</TD>
<TD data-formula="=C4">Donec</TD>
<TD >4</TD>
<TD >Aliquam</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD >Get Checkbox Value</TD>
<TD >"=C5"</TD>
<TD data-formula="=C5" >false</TD>
<TD >534456</TD>
<TD >Vivamus</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD >3</TD>
<TD >Etiam</TD>
</TR>
<TR height="18px" style="height: 18px;">
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD >1</TD>
<TD >Donec</TD>
</TR>
</TBODY>
</TABLE>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
var times = 0;
$('<div />').load('financial.html #sheetParent table', function() {
var html = $(this).html(),
parent = $('#sheetParent');
for (var i = 0; i < 5; i++) {
parent
.html(html)
.sheet();
$.sheet.killAll();
times++;
}
parent
.html(html)
.sheet();
$('<div>You just killed this sheet ' + times + ' times</div>').dialog({modal: true});
});
});
</script>
</head>
<body>
<div id="sheetParent" title="Killall">
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
$('#sheetParent').sheet();
});
</script>
</head>
<body>
<div id="sheetParent" title="Logical Functions">
<table title="Logical Functions">
<tbody>
<tr>
<td class="styleBold styleCenter">Function</td>
<td class="styleBold styleCenter">Execution</td>
<td class="styleBold styleCenter">Desired Result</td>
<td class="styleBold styleCenter">Correct?</td>
<td class="styleBold styleCenter">Notes</td>
</tr>
<tr>
<td>AND</td>
<td data-formula="=AND(true,true,true,true)"></td>
<td data-formula="=TRUE()"></td>
<td data-formula="=IF(B2 = C2, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>AND</td>
<td data-formula="=AND(true,false,true,true)"></td>
<td data-formula="=FALSE()"></td>
<td data-formula="=IF(B3 = C3, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>FALSE</td>
<td data-formula="=FALSE()"></td>
<td data-formula="=FALSE()"></td>
<td data-formula="=IF(B4 = C4, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>TRUE</td>
<td data-formula="=TRUE()"></td>
<td data-formula="=TRUE()"></td>
<td data-formula="=IF(B5 = C5, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>IF</td>
<td data-formula="=IF(TRUE(),TRUE(),FALSE())"></td>
<td data-formula="=TRUE()"></td>
<td data-formula="=IF(B6 = C6, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>IF</td>
<td data-formula="=IF(FALSE(),TRUE(),FALSE())"></td>
<td data-formula="=FALSE()"></td>
<td data-formula="=IF(B7 = C7, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>NOT</td>
<td data-formula="=NOT(FALSE())"></td>
<td data-formula="=TRUE()"></td>
<td data-formula="=IF(B8 = C8, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>NOT</td>
<td data-formula="=NOT(TRUE())"></td>
<td data-formula="=FALSE()"></td>
<td data-formula="=IF(B9 = C9, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>OR</td>
<td data-formula="=OR(TRUE(), FALSE())"></td>
<td data-formula="=TRUE()"></td>
<td data-formula="=IF(B10 = C10, TRUE, FALSE)"></td>
<td></td>
</tr>
<tr>
<td>OR</td>
<td data-formula="=OR(FALSE(), FALSE())"></td>
<td data-formula="=FALSE()"></td>
<td data-formula="=IF(B11 = C11, TRUE, FALSE)"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>jQuery.sheet - The Ajax Spreadsheet</title>
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://rawgithub.com/Spreadsheets/formula/master/formula.js"></script>
<script type="text/javascript" src="../jquery.sheet.js"></script>
<script type="text/javascript">
$.sheet.preLoad('../');
$(function() {
if (confirm('There are ' + (1000 * 26) + ' cells in this spreadsheet, each with a formula (RAND()*PI()). This particular spreadsheet is usually used to find what makes jQuery.sheet slow, and make it faster. It may take some time, proceed?')) {
var table = $.sheet.makeTable({cols: 26, rows: 1000}),
tds = table.getElementsByTagName('td'),
i = tds.length - 1;
do {
tds[i].setAttribute('data-formula', 'RAND()*PI()');
} while (i-- > 1);
$('#sheetParent')
.html(table)
.sheet();
} else {
$('#sheetParent').html('Refresh page to begin loading spreadsheet');
}
});
</script>
</head>
<body>
<div id="sheetParent" title="Moderate Stress Test"></div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment