Search in sources :

Example 1 with HSSFDataFormatter

use of org.apache.poi.hssf.usermodel.HSSFDataFormatter in project poi by apache.

the class TestTime method setUp.

@Before
public void setUp() {
    wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");
    style = wb.createCellStyle();
    HSSFDataFormat fmt = wb.createDataFormat();
    style.setDataFormat(fmt.getFormat("hh:mm:ss"));
    cell11 = sheet.createRow(0).createCell(0);
    form = new HSSFDataFormatter();
    evaluator = new HSSFFormulaEvaluator(wb);
}
Also used : HSSFFormulaEvaluator(org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator) HSSFDataFormat(org.apache.poi.hssf.usermodel.HSSFDataFormat) HSSFSheet(org.apache.poi.hssf.usermodel.HSSFSheet) HSSFDataFormatter(org.apache.poi.hssf.usermodel.HSSFDataFormatter) HSSFWorkbook(org.apache.poi.hssf.usermodel.HSSFWorkbook) Before(org.junit.Before)

Aggregations

HSSFDataFormat (org.apache.poi.hssf.usermodel.HSSFDataFormat)1 HSSFDataFormatter (org.apache.poi.hssf.usermodel.HSSFDataFormatter)1 HSSFFormulaEvaluator (org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator)1 HSSFSheet (org.apache.poi.hssf.usermodel.HSSFSheet)1 HSSFWorkbook (org.apache.poi.hssf.usermodel.HSSFWorkbook)1 Before (org.junit.Before)1