use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetPr in project poi by apache.
the class SXSSFSheet method setTabColor.
/**
* Set background color of the sheet tab
*
* @param colorIndex the indexed color to set, must be a constant from {@link IndexedColors}
*/
public void setTabColor(int colorIndex) {
CTWorksheet ct = _sh.getCTWorksheet();
CTSheetPr pr = ct.getSheetPr();
if (pr == null)
pr = ct.addNewSheetPr();
CTColor color = CTColor.Factory.newInstance();
color.setIndexed(colorIndex);
pr.setTabColor(color);
}
Aggregations