package com.cftech.showroom.appform.web;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lisw
 * @program cftech-platform
 * @description
 * @createDate 2020-08-21 14:49:48
 **/
public class EasyExcelTest {

    public static void main(String[] args) {
        File file = new File("/Users/lisw/work/work-document/"+System.currentTimeMillis()+".xls");
        Map<String, Object> map = new HashMap<>();
        ExcelWriter excelWriter = EasyExcel.write(file).withTemplate("/Users/lisw/work/work-document/sfl-template/BrandApplyExportEvaluateTemplate.xlsx").build();
        WriteSheet writeSheet = EasyExcel.writerSheet().build();
        excelWriter.fill(map, writeSheet);
        //excelWriter.fill(list, writeSheet);
        excelWriter.finish();
    }
}
