jxls导入excel,怎么将不同数据导入到对应的sheet页

img


这是sheet页,我要根据数据的不同类型传入到不同的sheet页中,应该怎么办

        context.putVar("date1","9999-12-31");
        context.putVar("date2","9999-12-31");
        context.putVar("date3","9999-12-31");
        context.putVar("company", "null");
        context.putVar("product", "null");
        context.putVar("statistics", "null");
        context.putVar("object", "null");
        if ("1".equals(request.getParameter("check"))){
            context.putVar("check", "☑️");
        } else {
            context.putVar("check", "□️");
        }


        //加载模板
        InputStream exIs = this.getClass().getResourceAsStream("/"+exportTempName);
        //生成导出文件
        File tempFile = new File(System.getProperty("java.io.tmpdir") + File.separator + System.currentTimeMillis());
        OutputStream os = new BufferedOutputStream(new FileOutputStream(tempFile));
        JxlsHelper.getInstance().processTemplate(exIs, os, context);

这是我写的代码,现在只能导入到第一页中,我要怎样将这些数据导入到其他sheet页中

可以通过sheetAt方法获取要导入的sheet。

easy excel