[pmwiki-users] Spreadsheet style calculations

DaveG pmwiki at solidgone.com
Sat Dec 30 22:40:00 CST 2006


I'll take a look at the snipit you provided. Do you have the original 
code handy somewhere, and some time to dig it out for me?

  ~ ~ Dave

J. Meijer wrote:
> 
> 
> 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.
> 
> /jm
> 
> 
> 
> 
> 
> On 12/27/06, *DaveG* <pmwiki at solidgone.com> wrote:
> 
>     Is there any way to do basic computations in PMWiki? I have an excel
>     spreadsheet that I'd like to move onto the wiki. The sheet has the
>     following columns (actually a few more, but these are the core):
> 
>     Gallons - Miles - Miles/Gallon
> 
>     I'd like to be able to enter the first two cols and have PM calculate
>     the 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 Check it out! <http://maps.live.com/?wip=51>




More information about the pmwiki-users mailing list