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 setCustomWidth(long index, boolean bestFit) { CTCol col = getOrCreateColumn1Based(index + 1, true); col.setCustomWidth(bestFit); }