public void setColHidden(long index, boolean hidden) { CTCol col = getOrCreateColumn1Based(index+1, true); col.setHidden(hidden); }
/** * Sets all adjacent columns of the same outline level to the specified * hidden status. * * @param pIdx * the col info index of the start of the outline group * @return the column index of the last column in the outline group */ private int setGroupHidden(int pIdx, int level, boolean hidden) { CTCols cols = worksheet.getColsArray(0); int idx = pIdx; CTCol[] colArray = cols.getColArray(); CTCol columnInfo = colArray[idx]; while (idx < colArray.length) { columnInfo.setHidden(hidden); if (idx + 1 < colArray.length) { CTCol nextColumnInfo = colArray[idx + 1]; if (!isAdjacentBefore(columnInfo, nextColumnInfo)) { break; } if (nextColumnInfo.getOutlineLevel() < level) { break; } columnInfo = nextColumnInfo; } idx++; } return (int) columnInfo.getMax(); }
public void setColumnAttributes(CTCol fromCol, CTCol toCol) { if(fromCol.isSetBestFit()) toCol.setBestFit(fromCol.getBestFit()); if(fromCol.isSetCustomWidth()) toCol.setCustomWidth(fromCol.getCustomWidth()); if(fromCol.isSetHidden()) toCol.setHidden(fromCol.getHidden()); if(fromCol.isSetStyle()) toCol.setStyle(fromCol.getStyle()); if(fromCol.isSetWidth()) toCol.setWidth(fromCol.getWidth()); if(fromCol.isSetCollapsed()) toCol.setCollapsed(fromCol.getCollapsed()); if(fromCol.isSetPhonetic()) toCol.setPhonetic(fromCol.getPhonetic()); if(fromCol.isSetOutlineLevel()) toCol.setOutlineLevel(fromCol.getOutlineLevel()); toCol.setCollapsed(fromCol.isSetCollapsed()); }
public void setColHidden(long index, boolean hidden) { CTCol col = getOrCreateColumn1Based(index+1, true); col.setHidden(hidden); }
public void setColHidden(long index, boolean hidden) { CTCol col = getOrCreateColumn1Based(index+1, true); col.setHidden(hidden); }
CTCol col = sheet.getCTWorksheet().getColsArray(0).addNewCol(); col.setMin(myLastColumn+2); col.setMax(16384); // the last column (1-indexed) col.setHidden(true);
/** * Sets all adjacent columns of the same outline level to the specified * hidden status. * * @param pIdx * the col info index of the start of the outline group * @return the column index of the last column in the outline group */ private int setGroupHidden(int pIdx, int level, boolean hidden) { CTCols cols = worksheet.getColsArray(0); int idx = pIdx; CTCol[] colArray = cols.getColArray(); CTCol columnInfo = colArray[idx]; while (idx < colArray.length) { columnInfo.setHidden(hidden); if (idx + 1 < colArray.length) { CTCol nextColumnInfo = colArray[idx + 1]; if (!isAdjacentBefore(columnInfo, nextColumnInfo)) { break; } if (nextColumnInfo.getOutlineLevel() < level) { break; } columnInfo = nextColumnInfo; } idx++; } return (int) columnInfo.getMax(); }
/** * Sets all adjacent columns of the same outline level to the specified * hidden status. * * @param pIdx * the col info index of the start of the outline group * @return the column index of the last column in the outline group */ private int setGroupHidden(int pIdx, int level, boolean hidden) { CTCols cols = worksheet.getColsArray(0); int idx = pIdx; CTCol columnInfo = cols.getColArray(idx); while (idx < cols.sizeOfColArray()) { columnInfo.setHidden(hidden); if (idx + 1 < cols.sizeOfColArray()) { CTCol nextColumnInfo = cols.getColArray(idx + 1); if (!isAdjacentBefore(columnInfo, nextColumnInfo)) { break; } if (nextColumnInfo.getOutlineLevel() < level) { break; } columnInfo = nextColumnInfo; } idx++; } return (int) columnInfo.getMax(); }
public void setColumnAttributes(CTCol fromCol, CTCol toCol) { if(fromCol.isSetBestFit()) toCol.setBestFit(fromCol.getBestFit()); if(fromCol.isSetCustomWidth()) toCol.setCustomWidth(fromCol.getCustomWidth()); if(fromCol.isSetHidden()) toCol.setHidden(fromCol.getHidden()); if(fromCol.isSetStyle()) toCol.setStyle(fromCol.getStyle()); if(fromCol.isSetWidth()) toCol.setWidth(fromCol.getWidth()); if(fromCol.isSetCollapsed()) toCol.setCollapsed(fromCol.getCollapsed()); if(fromCol.isSetPhonetic()) toCol.setPhonetic(fromCol.getPhonetic()); if(fromCol.isSetOutlineLevel()) toCol.setOutlineLevel(fromCol.getOutlineLevel()); toCol.setCollapsed(fromCol.isSetCollapsed()); }
public void setColumnAttributes(CTCol fromCol, CTCol toCol) { if(fromCol.isSetBestFit()) toCol.setBestFit(fromCol.getBestFit()); if(fromCol.isSetCustomWidth()) toCol.setCustomWidth(fromCol.getCustomWidth()); if(fromCol.isSetHidden()) toCol.setHidden(fromCol.getHidden()); if(fromCol.isSetStyle()) toCol.setStyle(fromCol.getStyle()); if(fromCol.isSetWidth()) toCol.setWidth(fromCol.getWidth()); if(fromCol.isSetCollapsed()) toCol.setCollapsed(fromCol.getCollapsed()); if(fromCol.isSetPhonetic()) toCol.setPhonetic(fromCol.getPhonetic()); if(fromCol.isSetOutlineLevel()) toCol.setOutlineLevel(fromCol.getOutlineLevel()); toCol.setCollapsed(fromCol.isSetCollapsed()); }