= Excel

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The _Excel_ module provides the ability to read from  Excel spreadsheets, which can be useful for certain use cases, eg bulk import of data.
Each row of a spreadsheet can be mapped to a domain object, usually a view model.
The view model can validate itself and then be applied.

The module also supports the opposite use case, converting a collection of domain objects into an Excel spreadsheet.

In addition, the library provides fixture support, allowing test data to be specified in a spreadsheet.



== Setup

=== Dependency Management

Add a section for _Excel_ module's own  BOM:

[source,xml,subs="attributes+"]
.pom.xml
----
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.causeway.extensions</groupId>
            <artifactId>causeway-extensions-excel</artifactId>
            <scope>import</scope>
            <type>pom</type>
            <version>{page-causewayrel}</version>
        </dependency>
    </dependencies>
</dependencyManagement>
----

[#dependencies]
=== Dependencies

In the modules of your application that will use the _Excel_ extension, add the following dependency/ies:

* for xref:export-and-import[export/import], add:
+
[source,xml]
.pom.xml
----
<dependencies>
    <dependency>
        <groupId>org.apache.causeway.extensions</groupId>
        <artifactId>causeway-extensions-excel-applib</artifactId>
    </dependency>
</dependencies>
----

* for xref:fixture-support[fixture support], add:
+
[source,xml]
.pom.xml
----
<dependencies>
    <dependency>
        <groupId>org.apache.causeway.extensions</groupId>
        <artifactId>causeway-extensions-excel-testing</artifactId>
    </dependency>
</dependencies>
----



[#export-and-import]
== Export and Import

TODO - v2

[#fixture-support]
== Fixture Support

TODO - v2

== See also

* xref:testing:fixtures:about.adoc[] (in the xref:testing::about.adoc[Testing Guide]).
