Example usage for org.apache.poi.ss.usermodel HorizontalAlignment GENERAL

List of usage examples for org.apache.poi.ss.usermodel HorizontalAlignment GENERAL

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel HorizontalAlignment GENERAL.

Prototype

HorizontalAlignment GENERAL

To view the source code for org.apache.poi.ss.usermodel HorizontalAlignment GENERAL.

Click Source Link

Document

The horizontal alignment is general-aligned.

Usage

From source file:uk.co.certait.test.ExcelToHtmlConverter.java

License:Apache License

private String tagStyle(Cell cell, CellStyle style) {
    if (style.getAlignmentEnum() == HorizontalAlignment.GENERAL) {
        switch (ultimateCellType(cell)) {
        case STRING:
            return "style=\"text-align: left;\"";
        case BOOLEAN:
        case ERROR:
            return "style=\"text-align: center;\"";
        case NUMERIC:
        default:/*from w ww.  ja  v  a  2s . c o m*/
            // "right" is the default
            break;
        }
    }
    return "";
}