[]
        
(Showing Draft Content)

InvalidTemplateException

Class InvalidTemplateException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.grapecity.documents.excel.template.InvalidTemplateException
All Implemented Interfaces:
Serializable

public class InvalidTemplateException extends RuntimeException
The exception that is thrown when a template is invalid.

 Workbook workbook = new Workbook();
 IWorksheet worksheet = workbook.getWorksheets().get(0);
 worksheet.getRange("A1").setValue("{{ds.Test(DefaultValue=GGB)}}");
 try {
     workbook.processTemplate();
 } catch (InvalidTemplateException exception) {
     String actualMessage = exception.getMessage();
 }
 
  • Constructor Details

    • InvalidTemplateException

      public InvalidTemplateException(String message)
      Initializes a new instance of the InvalidTemplateException class with a specified error message.
      Parameters:
      message - The message that describes the error.