slitaz-dev-tools view tazwikiss/rootfs/var/www/wiki/pages/HelpCalc.txt @ rev 200

tazwikiss: add calc plugin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 17 13:32:25 2013 +0000 (2013-11-17)
parents
children d80619cb46db
line source
1 !Help on the CSV spreadsheet
2 !!Creation
3 Spreadsheets are created from inlined CSV data with at least 2 rows and 2 lines :
4 * The CSV lines must end with a ''';'''
5 * The CSV lines have 2 or more ''';'''
6 * Each CSV line have the same count of ''';'''
7 * Each cell is addressed by a letter and a number, and may hold
8 ** Some text
9 ** A number
10 ** A ''javascript'' formula starting with '''='''
11 !!Usage
12 * Move the mouse over the cells to see the contents
13 * click and modify the white cells
14 ** click anywhere outside the cell to recompute everything
15 * click to a gray cell to see the CSV update
16 !!Examples
17 {{Apples;12;=parseInt((100*B1)/B3)+'%';
18 Pears;7;=parseInt((100*B2)/B3)+"%";
19 Total :;=B1+B2;;}}
20 Apples;12;=parseInt((100*B1)/B3)+'%';
21 Pears;7;=parseInt((100*B2)/B3)+"%";
22 Total :;=B1+B2;;
23 {{A number;its square root;
24 2;=(A2&lt;0)?alert('A2 &lt; 0 !'):Math.sqrt(A2);}}
25 A number;its square root;
26 2;=(A2&lt;0)?alert('A2 &lt; 0 !'):Math.sqrt(A2);