Class ExportManagerModule


  • public class ExportManagerModule
    extends java.lang.Object
    Generates PDF and Excel files using this module.
    • Constructor Detail

      • ExportManagerModule

        public ExportManagerModule()
    • Method Detail

      • createExcelGrid

        public static IExcelGrid createExcelGrid()
        Creates a new Excel grid.
        Returns:
        the Excel grid
      • generateXLS

        public static IMendixObject generateXLS​(IContext context,
                                                IMendixObject fileObject,
                                                java.lang.String fileName,
                                                IExcelGrid grid)
                                         throws CoreException
        Generates an Excel file from the given grid.
        Parameters:
        context - the context to use
        fileObject - the file document object
        fileName - the file name
        grid - the grid to be converted
        Returns:
        the file object
        Throws:
        CoreException - if generating the Excel file failed
      • generateXLS

        public static IMendixObject generateXLS​(IContext context,
                                                IMendixObject fileObject,
                                                java.lang.String fileName,
                                                java.util.List<IExcelGrid> grids)
                                         throws CoreException
        Generates an Excel file from the given grids.
        Parameters:
        context - the context to use
        fileObject - the file document object
        fileName - the file name
        grids - the grids to be converted
        Returns:
        the file object
        Throws:
        CoreException - if generating the Excel file failed
      • generateXLS

        public static IMendixObject generateXLS​(IContext context,
                                                IMendixObject fileObject,
                                                java.lang.String fileName,
                                                java.util.List<java.lang.String> oqlQueries,
                                                boolean autoSizeColumns)
                                         throws CoreException
        Generates an Excel file from the given OQL queries.
        Parameters:
        context - the context to use
        fileObject - the file document object
        fileName - the file name
        oqlQueries - the OQL queries
        autoSizeColumns - indicates whether to size columns automatically
        Returns:
        the file object
        Throws:
        CoreException - if generating the Excel file failed
      • generateXLS

        public static IMendixObject generateXLS​(IContext context,
                                                IMendixObject fileObject,
                                                java.lang.String fileName,
                                                java.lang.String oqlQuery,
                                                boolean autoSizeColumns)
                                         throws CoreException
        Generates an Excel file from the given OQL query.
        Parameters:
        context - the context to use
        fileObject - the file document object
        fileName - the file name
        oqlQuery - the OQL query
        autoSizeColumns - indicates whether to size columns automatically
        Returns:
        the file object
        Throws:
        CoreException - if generating the Excel file failed
      • generateXLS

        public static IMendixObject generateXLS​(IContext context,
                                                IMendixObject fileObject,
                                                java.lang.String fileName,
                                                java.lang.String oqlQuery,
                                                boolean autoSizeColumns,
                                                java.util.List<java.lang.String> headerNames)
                                         throws CoreException
        Generates an Excel file from the given OQL query.
        Parameters:
        context - the context to use
        fileObject - the file document object
        fileName - the file name
        oqlQuery - the OQL query
        autoSizeColumns - indicates whether to size columns automatically
        headerNames - the columns names
        Returns:
        the file object
        Throws:
        CoreException - if generating the Excel file failed