java.lang.Object
pro.verron.officestamper.experimental.ExcelStamper
- All Implemented Interfaces:
OfficeStamper<org.docx4j.openpackaging.packages.SpreadsheetMLPackage>
public class ExcelStamper
extends Object
implements OfficeStamper<org.docx4j.openpackaging.packages.SpreadsheetMLPackage>
The ExcelStamper class is an implementation of the OfficeStamper interface for stamping Excel templates.
It uses the DOCX4J library to manipulate the template and replace variable expressions with values from the context.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
stamp
(org.docx4j.openpackaging.packages.SpreadsheetMLPackage template, Object context, OutputStream outputStream) Stamps the template with the context and writes the result to the outputStream.
-
Constructor Details
-
ExcelStamper
public ExcelStamper()
-
-
Method Details
-
stamp
public void stamp(org.docx4j.openpackaging.packages.SpreadsheetMLPackage template, Object context, OutputStream outputStream) throws OfficeStamperException Description copied from interface:OfficeStamper
Stamps the template with the context and writes the result to the outputStream.- Specified by:
stamp
in interfaceOfficeStamper<org.docx4j.openpackaging.packages.SpreadsheetMLPackage>
- Parameters:
template
- template to stampcontext
- context to use for stampingoutputStream
- output stream to write the result to- Throws:
OfficeStamperException
- if the stamping fails
-