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

com.joe.utils.poi.data.StringDataWriter Maven / Gradle / Ivy

The newest version!
package com.joe.utils.poi.data;

import org.apache.poi.ss.usermodel.Cell;

import com.joe.utils.poi.ExcelDataWriter;

/**
 * @author joe
 * @version 2018.06.14 14:31
 */
public class StringDataWriter implements ExcelDataWriter {
    @Override
    public void write(Cell cell, String s) {
        cell.setCellValue(s);
    }

    @Override
    public boolean writeable(Object data) {
        return data == null || (data instanceof String);
    }

    @Override
    public boolean writeable(Class type) {
        if (type != null && type.equals(String.class)) {
            return true;
        }
        return false;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy