All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.gjing.tools.excel.write.resolver.ExcelWriteXlsResolver Maven / Gradle / Ivy

There is a newer version: 2021.12.3
Show newest version
package cn.gjing.tools.excel.write.resolver;

import cn.gjing.tools.excel.metadata.ExcelWriterResolver;
import cn.gjing.tools.excel.write.BigTitle;
import cn.gjing.tools.excel.write.ExcelWriterContext;
import cn.gjing.tools.excel.write.callback.ExcelAutoMergeCallback;

import java.util.List;
import java.util.Map;

/**
 * XLS resolver
 *
 * @author Gjing
 **/
class ExcelWriteXlsResolver extends ExcelWriterResolver {
    private ExcelWriteExecutor excelWriteExecutor;

    @Override
    public void init(ExcelWriterContext context) {
        this.excelWriteExecutor = new ExcelWriteExecutor(context);
    }

    @Override
    public void writeTitle(BigTitle bigTitle) {
        this.excelWriteExecutor.writeTitle(bigTitle);
    }

    @Override
    public ExcelWriterResolver writeHead(boolean needHead, Map dropdownBoxValues) {
        this.excelWriteExecutor.writeHead(needHead, dropdownBoxValues);
        return this;
    }

    @Override
    public ExcelWriterResolver simpleWriteHead(boolean needHead) {
        this.excelWriteExecutor.simpleWriteHead(needHead);
        return this;
    }

    @Override
    public void simpleWrite(List> data, boolean mergeEmpty,Map> callbackCache) {
        this.excelWriteExecutor.simpleWriteBody(data, mergeEmpty,callbackCache);
    }

    @Override
    public void write(List data) {
        this.excelWriteExecutor.writeBody(data);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy