[pmwiki-users] Spreadsheet style calculations

J. Meijer commentgg at hotmail.com
Fri Dec 29 10:38:51 CST 2006


Dave, I have a script that sums row and sums columns putting in a markup in the summing row/column and quite a bit smarter then the code below. Haven't looked at it in a while. Your problem is similar and could be solved using 'relative' addressing. Recognize cells which have the sequence you need and modify them, something like (for simple tables):  Markup('celldiv','>{$var}'    ,'/([|][|] *(\d+(?:[.,]\d+)) *[|][|] *(\d+(?:[.,]\d+)) *[|][|] *)[(][(](+|-|/*)[)][)]/e'    ,"'$1'.($2$4$3)");This recognizes 2 numeric cells leading up to a third containing the ((/)) markup. The same markup would allow ((+)), ((-)) and ((*)) also. It will only perform its magic on numeric inputs, it won't cascade into formulas. /jmOn 12/27/06, DaveG <pmwiki at solidgone.com> wrote:Is there any way to do basic computations in PMWiki? I have an excelspreadsheet that I'd like to move onto the wiki. The sheet has thefollowing columns (actually a few more, but these are the core):Gallons - Miles - Miles/GallonI'd like to be able to enter the first two cols and have PM calculatethe third. Additionally I'd like to maintain a "Average of Miles/Gallon"number as well.Is the built-in functionaity to do this, or a Recipe somewhere?  ~ ~ Dave
_________________________________________________________________
Try amazing new 3D maps
http://maps.live.com/?wip=51
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20061229/07682b6d/attachment.html 


More information about the pmwiki-users mailing list