use of com.alibaba.excel.write.style.column.AbstractHeadColumnWidthStyleStrategy in project easyexcel by alibaba.
the class AbstractWriteHolder method dealColumnWidth.
private void dealColumnWidth(List<WriteHandler> handlerList) {
WriteHandler columnWidthStyleStrategy = new AbstractHeadColumnWidthStyleStrategy() {
@Override
protected Integer columnWidth(Head head, Integer columnIndex) {
if (head == null) {
return null;
}
if (head.getColumnWidthProperty() != null) {
return head.getColumnWidthProperty().getWidth();
}
return null;
}
};
handlerList.add(columnWidthStyleStrategy);
}
Aggregations