We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
同样的代码,在3.0.0-beta3是正常导出的,在3.0.1版本中自定义宽度失效,其它注解正常 触发Bug的代码
/** * 订单号 */ @ColumnWidth(25) @ExcelProperty(value = "订单号", order = 1) @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER) private String orderNo; /** * 订单标题 */ @ColumnWidth(75) @ExcelProperty(value = "订单标题", order = 2) private WriteCellData<String> title; /** * 总金额 */ @ColumnWidth(20) @ExcelProperty(value = "总金额", order = 4) private String totalAmount; /** * 支付金额 */ @ColumnWidth(20) @ExcelProperty(value = "支付金额", order = 5) private String payAmount; /** * 支付类型 */ @ColumnWidth(20) @ExcelProperty(value = "支付类型", order = 6) private String payType; /** * 订单类型 */ @ColumnWidth(20) @ExcelProperty(value = "订单类型", order = 7) private String type; /** * 订单状态 */ @ColumnWidth(20) @ExcelProperty(value = "订单状态", order = 8) private String state; /** * 支付状态 */ @ColumnWidth(20) @ExcelProperty(value = "支付状态", order = 9) private String payState; /** * 下单时间 */ @DateTimeFormat(DatePattern.NORM_DATETIME_PATTERN) @ColumnWidth(20) @ExcelProperty(value = "下单时间", order = 10) @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER) private Date orderDatetime; /** * 收货人姓名 */ @ColumnWidth(20) @ExcelProperty(value = "收货人姓名", order = 11) private String rcvName; /** * 收货人电话号码 */ @ColumnWidth(20) @ExcelProperty(value = "收货人电话号码", order = 12) @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER) private String rcvFullPhoneNo; /** * 收货人电话号码 */ @ColumnWidth(60) @ExcelProperty(value = "收货人地址", order = 13) private String rcvFullAddr; /** * 发货类型(无, 物流, 线上, 自提) */ @ColumnWidth(40) @ExcelProperty(value = "发货类型(无, 物流, 线上, 自提)", order = 14) private String deliveryType; /** * 物流编号 */ @ColumnWidth(20) @ExcelProperty(value = "物流单号", order = 15) private String logisticsNo; /** * 物流公司编码 */ @ColumnWidth(20) @ExcelProperty(value = "物流公司编码", order = 16) private String logisticsCompanyCode; /** * 物流公司名称 */ @ColumnWidth(30) @ExcelProperty(value = "物流公司名称", order = 17) private String logisticsCompanyName;
写流代码: try (OutputStream os = response.getOutputStream()) { EasyExcel.write(os, OrderExcelRow.class) .sheet(0) .doWrite(() -> {
The text was updated successfully, but these errors were encountered:
就是,我还以为我哪里写的有问题呢
Sorry, something went wrong.
在3.0.2 中已经修复
3.0.2
* 修复列宽注解没用的bug [Issue #2151]
6366552
3d419fe
zhuangjiaju
No branches or pull requests
同样的代码,在3.0.0-beta3是正常导出的,在3.0.1版本中自定义宽度失效,其它注解正常
触发Bug的代码
写流代码:
try (OutputStream os = response.getOutputStream()) {
EasyExcel.write(os, OrderExcelRow.class)
.sheet(0)
.doWrite(() -> {
The text was updated successfully, but these errors were encountered: