Example usage for org.apache.poi.hssf.converter AbstractExcelUtils getAlign

List of usage examples for org.apache.poi.hssf.converter AbstractExcelUtils getAlign

Introduction

In this page you can find the example usage for org.apache.poi.hssf.converter AbstractExcelUtils getAlign.

Prototype

public static String getAlign(HorizontalAlignment alignment) 

Source Link

Usage

From source file:com.wangzhu.poi.ExcelToHtmlUtils.java

License:Apache License

public static void appendAlign(StringBuffer style, short alignment) {
    String cssAlign = AbstractExcelUtils.getAlign(alignment);
    if (ExcelToHtmlUtils.isEmpty(cssAlign)) {
        return;/*from   w  ww  .  j  a  v a  2  s.co  m*/
    }

    style.append("text-align:");
    style.append(cssAlign);
    style.append(";");
}