Loading...
 
Skip to main content

History: Spreadsheet jq

Source of version: 53 (current)

Copy to clipboard
            ^ The Tiki spreadsheet feature was [https://tiki.org/article70|added to Tiki in 2004 (version 1.9)] using Tiki specific PHP and JavaScript code. Starting in ((Tiki5)), the Tiki spreadsheet front-end was upgraded to use ((Spreadsheet jq|jquery.sheet)) for a much nicer interface, and more features. It worked well for years, and eventually, jQuery.sheet was renamed to WickedGrid. However, WickedGrid [https://github.com/Spreadsheets/WickedGrid/commits/master|has been inactive for years] so we need to switch to one of the [https://jspreadsheets.com/|many impressive modern alternatives]. If you would like to help with this, we are looking for financial sponsors and/or volunteer developers. And later, testers. Please contact [https://evoludata.com/Get-In-Touch|Marc Laporte].^

^ 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
[http://roberto.open-lab.com/2010/01/30/javascript-grid-editor-i-want-to-be-excel/|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:

{img src="display235" imalign=center} 

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))!)

::{img src="display233" class=reflect}:: 

That wiki markup will be parsed when saved.

::{img src="display234" class=reflect} ::

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

::{img src="display232" }::

Then, this new sheet is added to the workbook.

::{img src="display236" imalign=center}:: 

!! Spreadsheet Help

{CODE()}
{sheet(id=2)}
{CODE}

{sheet(id=2)}

And

{CODE()}
{sheet(id=2 simple=y width="100%" height="100%" subsheets=n)}
{CODE}

{sheet(id=2 simple=y width="100%" height="100%" subsheets=n)}

References:
* Jquery.sheet: http://www.visop-dev.com/jquerysheet.html
  [http://visop-dev.com/Project+jQuery.sheet|updated link to jQuery.sheet]
* ((Jquery))
* ((Spreadsheet))
* ((Tiki5))

!! Tiki6 features
A lot of work has happened from Tiki5 to Tiki6, 
* 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.instance[i].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
{QUOTE}

!!! 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:

{CENTER()}{img fileId="323" alt="" rel="box[g]" class=reflect}{CENTER} 

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:

{CENTER()}{img fileId="324" alt="" rel="box[g]" class=reflect}{CENTER}

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:

{CENTER()}{img fileId="325" alt="" rel="box[g]" class=reflect}{CENTER}

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):

{CODE(wrap="1", colors="javascript")}
=IF(E10=="Y",695,IF(E10=="N",495,"ERROR"))
{CODE}

or like this

{CODE(wrap="1", colors="javascript")}
=IF(SHEET1:E10=="N",0.08,IF(SHEET1:E10="Y",0.25,"ERROR"))
{CODE}

Aliases:
* (alias(Spreadsheet Jquery)) | (alias(Spreadsheet jquery.sheet)) | (alias(jquery.sheet))

        

History

Advanced
Information Version
Marc Laporte 53
Marc Laporte 52
Marc Laporte 51
Marc Laporte 50
Yves Kipondo 49
Xavier de Pedro 48
Xavier de Pedro 47
Xavi (as xavidp - admin) 46
pianoliv status: merge 45
Marc Laporte Site moved 44
Torsten Fabricius sheet id=2 is corrupted somehow! -> http://doc.tiki.org/tiki-view_sheets.php?sheetId=2 43
Torsten Fabricius This one: {sheet id="2"} ? -> try {sheet(id=2) /} 42
Torsten Fabricius not yet there 41
Torsten Fabricius a few more steps remaining, sorry 40
Torsten Fabricius filling up step by step to find the error 39
Torsten Fabricius tried with empty content 38
Torsten Fabricius tried to find the display error ... didn't get it 37
nethinim updated external link to jquery sheet 36
Xavier de Pedro added to the documentation toc structure 35
robertplummer 34
robertplummer 33
robertplummer 32
robertplummer 31
robertplummer 30
robertplummer 29
robertplummer 28
robertplummer 27
robertplummer 26
robertplummer 25
Marc Laporte 24
Marc Laporte 23
luciash d' being 🧙 typo 21
Xavier de Pedro 20
Xavier de Pedro 19
Xavier de Pedro 18
campbe13 17
Marc Laporte Sheet Plugin modified by editor. 16
Marc Laporte 15
Marc Laporte 14
Marc Laporte 13
Marc Laporte 12
Marc Laporte some done stuff 11
Marc Laporte 10
Marc Laporte 9
Marc Laporte 8
Xavier de Pedro 6
Marc Laporte 5
Xavier de Pedro 4
Xavier de Pedro 3
Xavier de Pedro 2