Fullscreen
[Show/Hide Right Column]

This page should merge with Spreadsheet




Spreadsheet using jQuery.sheet

The Spreadsheet feature can be be accessed through the jquery.sheet interface, added to Tiki since version 5.0

A review of jQuery.Sheet

Light years beyond other solutions at least as first impression, jQuery.sheet by Robert Plummer is a really wonderful library.

Usage


When adding a new spreadsheet, the interface is as usual in Tiki5: you have the option to allow wiki parsing of wiki content inside the spreadsheet, plus defining some parent relationship with other spreadsheets:

Image

When editing the spreadsheet, you can add more rows and columns, add content to them, move among the cells using the cursor keys, etc. If wiki parsing was enabled for the spreadsheet, then you can add any wiki syntax to the cell (including Wiki plugins!)

Image


That wiki markup will be parsed when saved.

Image


New sheets can be added when clickling at the plus sign ("+") at the bottom of the spreadsheet.

Image


Then, this new sheet is added to the workbook.

Image


Spreadsheet Help


Function Arguments Example Result Additional Information Sample # Sample Text
ABS numbers_as_array "=ABS(F4)" 62 23 Hello World
AVERAGE values_as_array "=AVERAGE(F4:F14)" 46.92307692307692 Synonym:?AVG 45 True
CEILING numbers_as_array "=CEILING(F4:F14)" 6,21E+016 62 False
COUNT html_as_string "=COUNT(F2:F14)" 13 108 To High
DAYSFROM url_as_string "=DAYSFROM(2009,4,15)" -11 200 To Low
DOLLAR numbers_as_array "=DOLLAR(F13)" $55.00 36 Perfect
FALSE "=IF(F4 < 100, TRUE(), FALSE())" TRUE 17 number
FIXED number, decimals, noCommas? "=FIXED(F4+F14)" 41.00 Two decimal places 99 numbers_as_array
FLOOR numbers_as_array "=FLOOR(F4-F5)" -46 Synonym: INT 100 values_as_array
HYPERLINK "=HYPERLINK("http://www.jquery.com", "jQuery's website")" jQuery's website -100 html_as_string
IF IF(logical_test, value_if_true, value_if_false) "=IF(F12 < 100, TRUE(), FALSE())" TRUE Can have nested IF functions. -14 url_as_string
IMG "=IMG("http://ui.jquery.com/images/logo.gif")" The url can be sensitive to numbers. Also, on initial load, because the image doesn't really have a size, the outerheight can be distorted. An easy way to offset this is to have some text in front of it that's taller than the image :). 55 values
MAX values_as_array "=MAX(F3:F13)" 200 -21
MIN values_as_array "=MIN(F3:F13)" -100
N numbers_as_array "=N(F3)" 45
PI "=PI()" 3.141592653589793 If you use "=PI" it will return the actual function as text, which is incorrect. Use "=PI()".
TODAY "=TODAY()" Wed Sep 15 2010 14:32:35 GMT-0400 (Eastern Daylight Time)
TRUE "=TRUE() || FALSE()" TRUE
SUM values_as_array "=SUM(F2:F13)" 631
ROUND numbers_as_array "=ROUND(1.6)" 2
RAND "=RAND()" 0.2405688383833392 Synonym: RND
Cell Navigation Result Dependancy Synonym
Left Arrow Active cell moves left if possible. jQuery.sheet.evt.cellClick() jS.evt.cellClick()
Chart Type Example Chart Data Month Year
Vertical Bar "=BARCHART(D2:D13)
Created with Raphaël4
Jan 2001
Horizontal Bar "=HBARCHART(D2:D13)
Created with Raphaël6
Feb 2002
Pie "=LINECHART(D2:D8, F2:F6)"
Created with Raphaël7.2
Mar 2003
Line "=PIECHART(D2:D8, E2:E8)"
Created with Raphaël7.5
Apr 2004
8.2 May 2005
9.1 Jun 2006
14.1 Jul 2007
16 Aug 2008
17.9 Sep 2009
22 Oct 2010
30 Nov 2011
32 Dec 2012
Inputs are for capturing fixed data, such as a drop down list (INPUT.SELECT), or a checkbox (INPUT.CHECKBOX)
Input Type Example Data Number Data String
Function Arguments Example Results Additional Information Sample # Sample Text
FACTORIAL number '=FACTORIAL(5)' #VALUE!: undefined
OMBINATION number, number '=COMBINATION(7,5) #VALUE!: undefined
PERMUTATION number, number '=PERMUTATION(7,5) #VALUE!: undefined
GAMMA number
PRECISION num, precision
MINIMUM array
MODE array
MAXIMUM array
MEAN array
SUM array
MEDIAN array
QUARTILES array
VARIANCE array
MEANDEV array
STDEV array
COVARIANCE array, array
CORR_COEFF array, array
UNIFORMCDF number, number, number
BINOMIAL number, number, number
BIONOMIALCDF num, num, num
NEGBIN num, num, num
NEGBINCDF N, m, n, x
HYPGEOM N, m, n, x
HYPGEOMCDF N, m, n, x
EXPONENTIALCDF l, x
POISSON l, x
POISSONCDF l, x
NORMCDF u, s, t
LINEAR_REQ_EQ array, array
EXP_REG_EQ array, array
SECANTMETHOD func, min, max, error, maxiter
FIVEPT func, x, h
FCRIT f, a b
ASR f, a b, precision


References:
updated link to jQuery.sheet

Tiki6 features

A lot of work has happened from Tiki5 to Tiki6,
  • Many examples at: http://visop-dev.ourwiki.net/sheets
  • Fill down, fill right
    • including formulas which update
  • colors of cell and text
  • Copy-paste from Excel
  • Make cells referencing variable names
    • Done - through use of calculations engine function CELLREF (example: "=CELLREF('mycell')"), but you must first set the cell's name using jQuery.sheet.instancei.setCellRef()
  • Remember columns size
  • Added startup option "minSize: {rows: 15, cols: 5}" and fn "checkMinSize" that will automatically add columns/rows
  • Merge & unmerge cell
  • Better error reporting (ex.: if a formula has a loop)
  • Uses AJAX for smoother user experience
  • PluginSheet
    • Show a range of cells (or single cell). Default shows all. e.g. "D1:F3" (or "e14:e14")
      • This allows using in a wiki page the result from a spreadsheet cell! (that's going to be very powerful for dynamic reports in wiki pages, not only of graphs but also from specific results from calculations). Budgets for projects, shown in wiki pages dynamically, etc. Templates of invoices, etc.
    • Now handles multisheet
  • The project plugin "jsanalysis" was dropped due to license issues, but it has been migrated those same functions to a new library for sheet: "jquery.sheet.advancedfn". Thus, we can now use this in the future for more advanced functions used in sheet for those users who need them. List of functions included:
    • Quote:
      FACTORIAL: jQuery.factorial,
      COMBINATION: jQuery.combination,
      PERMUTATION: jQuery.permutation,
      GAMMA: jQuery.gamma,
      PRECISION: jQuery.precision,
      MINIMUM: jQuery.minimum,
      MAXIMUM: jQuery.maximum,
      MEAN: jQuery.mean,
      SUM: jQuery.sum,
      MODE: jQuery.mode,
      MEDIAN: jQuery.median,
      QUARTILES: jQuery.quartiles,
      VARIANCE: jQuery.variance,
      MEANDEV: jQuery.meandev,
      STDEV: jQuery.stdev,
      COVARIANCE: jQuery.covariance,
      CORR_COEFF: jQuery.corr_coeff,
      UNIFORM: jQuery.uniform,
      BINOMIAL: jQuery.binomial,
      BINOMIALCDF: jQuery.binomialcdf,
      NEGBIN: jQuery.negbin,
      NEGBINCDF: jQuery.negbincdf,
      HYPGEOM: jQuery.hypgeom,
      HYPGEOMCDF: jQuery.hypgeomcdf,
      EXPONENTIALCDF: jQuery.exponentialcdf,
      POISSON: jQuery.poisson,
      POISSONCDF: jQuery.poissoncdf,
      NORMCDF: jQuery.normcdf,
      LINEAR_REG_EQ: jQuery.linear_reg_eq,
      SECANTMETHOD: jQuery.secantmethod,
      FIVEPT: jQuery.fivept,
      FCRIT: jQuery.fcrit,
      ASR: jQuery.asr

History: sheet differences shown

Since Tiki6 spreadsheets versions can be compared showing easily differences between any pair of versions: pink background for deleted content, green background when new content has been added, and prepending a "+" sign for the new text added, and a negative "-" sign for text deleted.

Example:

Sheet in edit mode, showing the new toolbar specific from the spreadsheet feature:

Image


When you click in the "History" button below each spreadsheet when it is in view mode, you are shown a table to choose which versions you want to compare:

Image


Then, after you select any pair, you can click on "compare", and you can see the differences between those two versions of the same spreadsheet:

Image


Note that scrollbars will be locked together to ease navigation on them both synchronized on the same columns at the sme time with a single scrollbar movement.

New syntax for formulas

You can use some formulas like in OOo Calc or MS Excel, using slightly different syntax (because the JQ Spreadsheet is using Javascript for the formulas):

=IF(E10=="Y",695,IF(E10=="N",495,"ERROR"))


or like this

=IF(SHEET1:E10=="N",0.08,IF(SHEET1:E10="Y",0.25,"ERROR"))


Aliases:



Contributors to this page: nethinim738 points  , xavi67871 points  , robertplummer310 points  , Marc Laporte9140 points  , luciash d' being2160 points  and campbe13658 points  .
Page last modified on Saturday 08 October, 2011 16:10:27 UTC by nethinim738 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki