com.groupdocs.assembly

Class DocumentTableSet

  • java.lang.Object
    • com.groupdocs.assembly.DocumentTableSet


  • public class DocumentTableSet
    extends java.lang.Object
    Provides access to data of multiple tables (or spreadsheets) located in an external document to be used while assembling a document. Also, enables to define parent-child relations for the document tables thus simplifying access to related data within template documents.

    For documents of Spreadsheet file formats, a DocumentTableSet instance represents a set of sheets. For documents of other file formats, a DocumentTableSet instance represents a set of tables.

    To access data of the corresponding tables while assembling a document, pass an instance of this class as a data source to one of DocumentAssembler. assembleDocument overloads.

    In template documents, a DocumentTableSet instance should be treated in the same way as if it was a DataSet instance. See template syntax reference for more information.

    • Constructor Detail

      • DocumentTableSet

        public DocumentTableSet(java.lang.String documentPath)
                         throws java.lang.Exception
        Creates a new instance of this class loading all tables from a document using default DocumentTableOptions.
        Parameters:
        documentPath - The path to a document containing tables to be accessed.
        Throws:
        java.lang.Exception
      • DocumentTableSet

        public DocumentTableSet(java.lang.String documentPath,
                                IDocumentTableLoadHandler loadHandler)
                         throws java.lang.Exception
        Creates a new instance of this class.
        Parameters:
        documentPath - The path to a document containing tables to be accessed.
        loadHandler - An IDocumentTableLoadHandler implementation controlling how document tables are loaded.
        Throws:
        java.lang.Exception
      • DocumentTableSet

        public DocumentTableSet(java.io.InputStream documentStream)
                         throws java.lang.Exception
        Creates a new instance of this class loading all tables from a document using default DocumentTableOptions.
        Parameters:
        documentStream - The stream containing a document with tables to be accessed.
        Throws:
        java.lang.Exception
      • DocumentTableSet

        public DocumentTableSet(java.io.InputStream documentStream,
                                IDocumentTableLoadHandler loadHandler)
                         throws java.lang.Exception
        Creates a new instance of this class.
        Parameters:
        documentStream - The stream containing a document with tables to be accessed.
        loadHandler - An IDocumentTableLoadHandler implementation controlling how document tables are loaded.
        Throws:
        java.lang.Exception
    • Method Detail

      • getRelations

        public DocumentTableRelationCollection getRelations()
        Gets the collection of parent-child relations defined for document tables of this set.
        Returns:
        The collection of parent-child relations defined for document tables of this set.