
com.github.dreamroute.excel.helper.util.DataAssistant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of excel-helper Show documentation
Show all versions of excel-helper Show documentation
excel export base on apache poi 3.17
The newest version!
package com.github.dreamroute.excel.helper.util;
import com.github.dreamroute.excel.helper.annotation.Column;
import com.github.dreamroute.excel.helper.annotation.DateColumn;
import com.github.dreamroute.excel.helper.cache.CacheFactory;
import com.github.dreamroute.excel.helper.exception.ExcelHelperException;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @author [email protected]
*/
public class DataAssistant {
private DataAssistant() {
}
public static List> createData(Collection> sheetData, Class> dataCls) {
List> result = new ArrayList<>();
List fields = CacheFactory.findFields(dataCls);
Iterator> dataIterator = sheetData.iterator();
while (dataIterator.hasNext()) {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy