excel-exporter - any good hints

I am trying to use the
excel-exporter add-on
, but I am getting weird problems. The biggest problem seems to be that it is asking for data elements I do not reference in my list of visible columns. Below is the code that is getting the exception:

    private ExportToExcelUtility<WrappedReplenishmentOrder> customizeExportExcelUtility(
            Object[] columns, String[]
 names, Grid grid, String title )
    {
        /* Configuring Components */
        ExportExcelComponentConfiguration componentConfig1;
        List<ComponentHeaderConfiguration> headerConfig = Arrays.asList(
                new ComponentHeaderConfigurationBuilder().withColumnHeaderKeys(
                names).build());
        componentConfig1 = new ExportExcelComponentConfigurationBuilder().withGrid(grid)
                .withVisibleProperties(columns)
                .withHeaderConfigs(headerConfig)
//                .withColumnConfigs(value)
                .build();

        /* Configuring Sheets */
        ArrayList<ExportExcelComponentConfiguration> componentList1 = new ArrayList<ExportExcelComponentConfiguration>();
        componentList1.add(componentConfig1);

        ExportExcelSheetConfiguration sheetConfig1;
        sheetConfig1 = new ExportExcelSheetConfigurationBuilder()
                .withReportTitle(title + " Report")
                .withSheetName(title)
                .withComponentConfigs(componentList1)
                .withIsHeaderSectionRequired(Boolean.TRUE)
                .build();

        /* Configuring Excel */
        ArrayList<ExportExcelSheetConfiguration> sheetList = new ArrayList<ExportExcelSheetConfiguration>();
        sheetList.add(sheetConfig1);
        
        String generatedBy = "Website";
        
        if( loginUser instanceof User )
        {
            String tempUser = null;
            
            if( loginUser.getUserInfo() instanceof UserResponseType )
            {
                if( loginUser.getUserInfo().getFirstName() instanceof String     &&
                        loginUser.getUserInfo().getLastName() instanceof String &&
                        !loginUser.getUserInfo().getLastName().trim().isEmpty()    &&
                        !loginUser.getUserInfo().getFirstName().trim().isEmpty())
                {
                    tempUser = loginUser.getUserInfo().getFirstName().trim() + " " +
                            loginUser.getUserInfo().getLastName().trim();
                }
            }
            
            if( tempUser instanceof String && !tempUser.trim().isEmpty() )
            {
                generatedBy = tempUser;
            }
            else if( loginUser.getUserName() instanceof String &&
                    !loginUser.getUserName().trim().isEmpty())
            {
                generatedBy = loginUser.getUserName().trim();
            }
            else if( loginUser.getUserId() instanceof String &&
                    !loginUser.getUserId().trim().isEmpty())
            {
                generatedBy = loginUser.getUserId().trim();
            }
        }
        
        ExportExcelConfiguration config1;
        config1 = new ExportExcelConfigurationBuilder()
                .withGeneratedBy(generatedBy)
                .withSheetConfigs(sheetList)
                .build();

        return new ExportToExcelUtility<WrappedReplenishmentOrder>(grid.getUI(), config1, WrappedReplenishmentOrder.class);
    }

The last line gives the exceptions/logs below:

Mar 09, 2018 6:42:07 PM org.vaadin.addons.excelexporter.ExportToExcelUtility getAllMethods
INFO: getAllMethods) throws + com.mobiwms.website.data.wrappers.WrappedReplenishmentOrder.getDateTimeFmt()
Mar 09, 2018 6:42:07 PM org.vaadin.addons.excelexporter.ExportToExcelUtility getAllMethods
INFO: getAllMethods) throws + com.mobiwms.website.data.wrappers.WrappedReplenishmentOrder.isDateTimeFmt()
java.lang.NoSuchMethodException: com.mobiwms.website.data.wrappers.WrappedReplenishmentOrder.getDateTimeFmt or com.mobiwms.website.data.wrappers.WrappedReplenishmentOrder.isDateTimeFmt not found!
    at org.vaadin.addons.excelexporter.ExportToExcelUtility.getAllMethods(ExportToExcelUtility.java:1354)
    at org.vaadin.addons.excelexporter.ExportToExcelUtility.lambda$performPreprocessing$0(ExportToExcelUtility.java:185)
    at java.lang.Thread.run(Thread.java:745)
Mar 09, 2018 6:42:07 PM org.vaadin.addons.excelexporter.ExportToExcelUtility getAllMethods
INFO: getAllMethods) throws + com.wmsvision.jaxb.SupplierPortal.impl.ReplenishmentOrderImpl.get__qName()
Mar 09, 2018 6:42:07 PM org.vaadin.addons.excelexporter.ExportToExcelUtility getAllMethods
INFO: getAllMethods) throws + com.wmsvision.jaxb.SupplierPortal.impl.ReplenishmentOrderImpl.is__qName()
java.lang.NoSuchMethodException: com.wmsvision.jaxb.SupplierPortal.impl.ReplenishmentOrderImpl.get__qName or com.wmsvision.jaxb.SupplierPortal.impl.ReplenishmentOrderImpl.is__qName not found!
    at org.vaadin.addons.excelexporter.ExportToExcelUtility.getAllMethods(ExportToExcelUtility.java:1354)
    at org.vaadin.addons.excelexporter.ExportToExcelUtility.lambda$performPreprocessing$0(ExportToExcelUtility.java:185)
    at java.lang.Thread.run(Thread.java:745)

Anyone know how to find the problem? The add-on does not provide all the source code, for instance the “builder” package, so I cannot dig into the code directly.

Has anyone else had this problem with this add-on? I would understand the error if my grid was referencing such data, but it is not referencing that data, so I am a little confused.

Ok, I fixed it ( sort of ). What I noticed is that the exception I was seeing was not reported to the user, it was in another thread. I did not notice this at first because I got an excel error for the file exported saying it was not an “XLS” formatted file ( to match suffix “.xls” ). Once I changed code to export XLSX ( with suffix “.xlsx” ), and decided to ignore the exception in the other thread, things seemed to work.

Still don’t understand the exception, but it seems to be safe to ignore.