com.namics.oss.java.tools.utils.excel.ExcelMapWriter Maven / Gradle / Ivy
/*
* Copyright 2000-2016 Namics AG. All rights reserved.
*/
package com.namics.oss.java.tools.utils.excel;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.OutputStream;
import java.util.*;
import static java.util.Arrays.asList;
/**
* ExcelMapWriter.
*
* @author tzehnder, Namics AG
* @since 05.10.2016 09:55
*/
public class ExcelMapWriter {
private static final Logger LOG = LoggerFactory.getLogger(ExcelMapWriter.class);
public static final String SHEET_NAME = "sheet1";
public static final int DEFAULT_HEADER_ROW = 0;
protected int headerRow = DEFAULT_HEADER_ROW;
/**
* Write a list of bean to excel file, support for xlsx only.
*
* @param maps maps to write to an excel sheet
* @param outputStream output stream to write the excel sheet
* @param ignores list of properties to be ignored on writing
* @throws ExcelException runtime exception when excel processiing failed
*/
public void write(List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy