Calculate summary, average, etc. of numbers in free format text
Example:
Calculate summary and average of items saled
Settings:
1) Replace unit=Word
2) Replace scope=Line
3) Search for pattern=<_NUMBER_>
4) Replace with pattern=$match
5) Replace->Advanced Page->Run following for each matched unit=
$t[$word_no]+=$match;
$a[$word_no]=int($t[$word_no]/($line_no-1)+0.5);
6) Replace->Advanced Page->=Insert end text=
------------------------------
Total:join(' ',@t)
Average:join(' ',@a)
Make a well-formated report from free format text
Example:
Calculate summary and average of items saled, use left-align 8.2 format, remove non-number words
Settings:
1) Replace unit=Word
2) Replace scope=Line
3) Search for pattern=<_NUMBER_>
4) Replace with pattern=$A
5) Print Unmatched unit=0(uncheck this option)
6) Replace->Advanced Page->Run following for each matched unit=
$t[$word_no]=calc($t[$word_no]+$match,"-8.2f");
$a[$word_no]=calc($t[$word_no]/($line_no-1),"-8.2f");
$A=calc($match,"-8.2f");
if ($word_no==1) {$A="\n\t".$A;}
7) Replace->Advanced Page->=Insert end text=
------------------------------
Total:\tjoin('',@t)
Avg:\tjoin('',@a)