package cn.superdesk.uniorder.common.excel.biz;

import com.alibaba.excel.write.handler.SheetWriteHandler;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;

import java.util.List;

public class CustomSheetWriteHandler implements SheetWriteHandler {

    @Override
    public void beforeSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {

    }

    @Override
    public void afterSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {
        String sheetName = writeSheetHolder.getSheetName();
        int sheetNo = writeWorkbookHolder.getWorkbook().getSheetIndex(sheetName);
        writeWorkbookHolder.getWorkbook().setSheetName(sheetNo,sheetName+"删除");
    }
}
