package com.qianwen.smartman.modules.mdc.strategy;
|
|
import com.alibaba.excel.metadata.CellData;
|
import com.alibaba.excel.metadata.Head;
|
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
|
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
|
import java.util.List;
|
import org.apache.poi.ss.usermodel.Cell;
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
public class ExcelWidthStyleStrategy extends AbstractColumnWidthStyleStrategy {
|
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<CellData> cellDataList, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) {
|
Sheet sheet = writeSheetHolder.getSheet();
|
sheet.setColumnWidth(cell.getColumnIndex(), 5000);
|
}
|
}
|