package org.fool.glorious.excel.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.apache.log4j.Logger;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.fool.glorious.excel.service.AbstractExcelService;

import java.io.FileInputStream;
import java.io.IOException;

@Slf4j
public class XlsxService  extends AbstractExcelService {

    public XlsxService(String path) {
        super(path);
    }

    @Override
    protected Workbook initializePoi(FileInputStream fis) {
        try {
            return new XSSFWorkbook(fis);
        } catch (IOException e) {
            log.error(e.getMessage());
        }
        return null;
    }
}
