Class ExcelStamper

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

    Constructors
    Constructor
    Description
    Default constructor for the ExcelStamper class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.docx4j.openpackaging.packages.SpreadsheetMLPackage
    stamp(org.docx4j.openpackaging.packages.SpreadsheetMLPackage template, Object context)
    Stamps the given template with the given context and returns the resulting document.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExcelStamper

      public ExcelStamper()
      Default constructor for the ExcelStamper class. This constructor initializes an instance of the ExcelStamper class, which implements the OfficeStamper interface for processing and stamping Excel templates. The class manipulates templates by replacing variable expressions with values from a given context.
  • Method Details

    • stamp

      public org.docx4j.openpackaging.packages.SpreadsheetMLPackage stamp(org.docx4j.openpackaging.packages.SpreadsheetMLPackage template, Object context) throws OfficeStamperException
      Description copied from interface: OfficeStamper
      Stamps the given template with the given context and returns the resulting document.
      Specified by:
      stamp in interface OfficeStamper<org.docx4j.openpackaging.packages.SpreadsheetMLPackage>
      Parameters:
      template - The template to stamp.
      context - The context to use for stamping.
      Returns:
      The resulting document after stamping.
      Throws:
      OfficeStamperException