POI显示Excel表格具体配置颜色


public static void main(String[] args)   {
    short colorNum = 2;//每行显示的颜色的个数
    short width1 = 2000;//颜色序宽度
    short width = 6000;//颜色名栏位的宽度
    XSSFWorkbook workbook = new XSSFWorkbook();
    CellStyle thStyle = workbook.createCellStyle();

    XSSFSheet sheet = workbook.createSheet("IndexedColors遍历");
    Row row =null;
    Cell cell;
    short i,j,index=0;
    String text="";
    for(i=0;i