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

cn.gjing.tools.excel.write.resolver.ExcelWriteXlsxResolver 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;

/**
 * Xlsx resolver
 *
 * @author Gjing
 **/
class ExcelWriteXlsxResolver 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 boxValues) {
        this.excelWriteExecutor.writeHead(needHead, boxValues);
        return this;
    }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy