AFC - Abacus Formula Compiler for Java

AFC XML Processor

XmlProc is a batch application that reads an input XML file with data, an spreadsheet file with an engine definition, and writes out another XML file with data computed from the input data using the spreadsheet.

This example is not done yet!

_And I just thought that, for a first version, it might be easier to use another Excel sheet for input data, and maybe yet another one for outputs, though that is more debatable._

Input File

A typical input file looks like this:

<data>
    <employee name="Arrenbrecht" firstname="Peter">
        <entry date="2006-12-14" time="9:30" duration="2:30" job="DSUM" />
        <entry date="2006-12-14" time="13:30" duration="3:00" job="DSUM" />
    </employee>
    <employee name="Testerson" firstname="Test">
        <entry date="2006-12-13" time="9:00" duration="3:00" job="DSUM" />
        <entry date="2006-12-14" time="8:30" duration="4:30" job="Docs" />
    </employee>
</data>

Spreadsheet File

A spreadsheet defining a computation over the input data might look like this:

A B C D E F G
1 Data Name First name Date Time Duration Job
2 Sample
(Name)
Joe
(FirstName)
1/1/06
(Date)
8:30
(Time)
2:30
(Duration)
Foo
(Job)
3 1/1/06 13:00 4:00 Bar
4 1/2/06 8:00 4:00 Foo
5 Exemplum Per 1/1/06 8:30 2:30 Foo
6 1/1/06 13:00 4:00 Bar
7 1/2/06 8:00 4:00 Foo
8
9 Selection Name First name Date Time Duration Job
10
11
12
13 Hours worked 21
=SUM(F2:F7)*24.0
(Result)

B2:G7 (Employees)
D2:G4 (Entries)