org.apache.poi.xssf.usermodel.helpers
public class ColumnHelper extends java.lang.Object
Constructor and Description |
---|
ColumnHelper(CTWorksheet worksheet) |
Modifier and Type | Method and Description |
---|---|
CTCols |
addCleanColIntoCols(CTCols cols,
CTCol col) |
void |
cleanColumns() |
CTCol |
cloneCol(CTCols cols,
CTCol col) |
boolean |
columnExists(CTCols cols,
long index)
Does the column at the given 0 based index exist
in the supplied list of column definitions?
|
int |
getColDefaultStyle(long index) |
CTCol |
getColumn(long index,
boolean splitColumns)
Returns the Column at the given 0 based index
|
CTCol |
getColumn1Based(long index1,
boolean splitColumns)
Returns the Column at the given 1 based index.
|
static double |
getColumnWidth(XSSFSheet sheet,
int column,
boolean useMergedCells) |
int |
getIndexOfColumn(CTCols cols,
CTCol col) |
protected CTCol |
getOrCreateColumn1Based(long index1,
boolean splitColumns)
Return the CTCol at the given (0 based) column index,
creating it if required.
|
void |
setColBestFit(long index,
boolean bestFit) |
void |
setColDefaultStyle(long index,
CellStyle style) |
void |
setColDefaultStyle(long index,
int styleId) |
void |
setColHidden(long index,
boolean hidden) |
void |
setColumnAttributes(CTCol fromCol,
CTCol toCol) |
void |
setColWidth(long index,
double width) |
void |
setCustomWidth(long index,
boolean bestFit) |
static void |
sortColumns(CTCols newCols) |
public void cleanColumns()
public static void sortColumns(CTCols newCols)
public CTCol cloneCol(CTCols cols, CTCol col)
public CTCol getColumn(long index, boolean splitColumns)
public CTCol getColumn1Based(long index1, boolean splitColumns)
public CTCols addCleanColIntoCols(CTCols cols, CTCol col)
public boolean columnExists(CTCols cols, long index)
public void setColumnAttributes(CTCol fromCol, CTCol toCol)
public void setColBestFit(long index, boolean bestFit)
public void setCustomWidth(long index, boolean bestFit)
public void setColWidth(long index, double width)
public void setColHidden(long index, boolean hidden)
protected CTCol getOrCreateColumn1Based(long index1, boolean splitColumns)
public void setColDefaultStyle(long index, CellStyle style)
public void setColDefaultStyle(long index, int styleId)
public int getColDefaultStyle(long index)
public int getIndexOfColumn(CTCols cols, CTCol col)
public static double getColumnWidth(XSSFSheet sheet, int column, boolean useMergedCells)
Copyright 2014 The Apache Software Foundation or its licensors, as applicable.