Example usage for org.apache.poi.hssf.model InternalWorkbook getFormats

List of usage examples for org.apache.poi.hssf.model InternalWorkbook getFormats

Introduction

In this page you can find the example usage for org.apache.poi.hssf.model InternalWorkbook getFormats.

Prototype

public List<FormatRecord> getFormats() 

Source Link

Document

Returns the list of FormatRecords in the workbook.

Usage

From source file:com.adanac.excel.reader.usermodel.ExcelHSSFDataFormat.java

License:Apache License

/**
 * Constructs a new data formatter.  It takes a workbook to have
 * access to the workbooks format records.
 * @param workbook the workbook the formats are tied to.
 *//*from ww w.  j a v  a2 s .c o m*/
ExcelHSSFDataFormat(InternalWorkbook workbook) {
    _workbook = workbook;

    Iterator<FormatRecord> i = workbook.getFormats().iterator();
    while (i.hasNext()) {
        FormatRecord r = i.next();
        ensureFormatsSize(r.getIndexCode());
        _formats.set(r.getIndexCode(), r.getFormatString());
    }
}