Package org.zkoss.poi.ss.usermodel

Examples of org.zkoss.poi.ss.usermodel.Workbook.createCellStyle()


        for (int col = lCol; col <= rCol; ++col) {
          final Cell cell = BookHelper.getCell(sheet, row, col);
          final CellStyle style = cell != null ? cell.getCellStyle() : null;
          final String oldFormat = style != null ? style.getDataFormatString() : null;
          if (oldFormat == null || "General".equals(oldFormat)) {
            CellStyle newCellStyle = book.createCellStyle();
            if (style != null) {
              newCellStyle.cloneStyleFrom(style);
            }
            BookHelper.setDataFormat(book, newCellStyle, formatString); //prepare a DataFormat with the specified formatString
            BookHelper.setCellStyle(sheet, row, col, row, col, newCellStyle);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.