org.apache.poi.ss.usermodel.Sheet#getColumnWidth ( )源码实例Demo

下面列出了org.apache.poi.ss.usermodel.Sheet#getColumnWidth ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: autopoi   文件: ExcelToHtmlServer.java
private int getTableWidth(Sheet sheet) {
	ensureColumnBounds(sheet);
	int width = 0;
	for (int i = firstColumn; i < endColumn; i++) {
		width = width + (sheet.getColumnWidth(i) / 32);
	}
	return width;
}
 
源代码2 项目: jeasypoi   文件: ExcelToHtmlServer.java
private int getTableWidth(Sheet sheet) {
	ensureColumnBounds(sheet);
	int width = 0;
	for (int i = firstColumn; i < endColumn; i++) {
		width = width + (sheet.getColumnWidth(i) / 32);
	}
	return width;
}
 
源代码3 项目: easypoi   文件: ExcelToHtmlServer.java
private int getTableWidth(Sheet sheet) {
    ensureColumnBounds(sheet);
    int width = 0;
    for (int i = firstColumn; i < endColumn; i++) {
        width = width + (sheet.getColumnWidth(i) / 32);
    }
    return width;
}
 
源代码4 项目: birt   文件: CellContentHandler.java
/**
 * Calculate the width of a set of columns, in millimetres.
 * @param startCol
 * The first column to consider (inclusive).
 * @param endCol
 * The last column to consider (inclusive).
 * @return
 * The sum of the widths of all columns between startCol and endCol (inclusive) in millimetres.
 */
private double spanWidthMillimetres( Sheet sheet, int startCol, int endCol ) {
	int result = 0;
	for ( int columnIndex = startCol; columnIndex <= endCol; ++columnIndex ) {
		result += sheet.getColumnWidth(columnIndex);
	}
	return ClientAnchorConversions.widthUnits2Millimetres( result );
}