Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用模板导出,内容写入有问题,没有填充模板而是新建sheet写入了 #22

Open
zmingchun opened this issue Jan 16, 2019 · 2 comments

Comments

@zmingchun
Copy link

如题。

@zmingchun
Copy link
Author

zmingchun commented Jan 16, 2019

Writer.create()
                            .headerStyle((wb, style) -> {
                                Font font = wb.createFont();
                                font.setFontHeightInPoints((short) 20);
                                font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex());
                                style.setFont(font);
                            })
                           .withTemplate(classPath + File.separator + "template" + File.separator + "stat_channel_template_ceping.xlsx")
                            .withRows(pageList.getList().stream().map(v -> {
                                StatChannelExportVo exportVo = new StatChannelExportVo();
                                exportVo.patch(v);
                                return exportVo;
                            }).collect(Collectors.toList()))
                            .to(ResponseWrapper.create(response, fileName+".xlsx"));

@maodou38
Copy link

模板导入的模板长什么样啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants