When generating excel jxl, increase Comments and freeze window

1. Increase comment

 

                         = New new label the Label the Label (C, rows, entry.getKey (), the format);
                     WritableCellFeatures cellFeatures new new WritableCellFeatures = ();
                     cellFeatures.setComment ( "Please enter 1 or 2 or 3 or 4 \ r \ n1: East \ r \ n2: West \ r \ n3: Southern District \ r \ n4: North "); // Add comment

                     label.setCellFeatures (cellFeatures);
                     sheet.addCell (label); // set the cell contents and format
                     sheet.setColumnView ( c, width); // Format cells

            There is a bit of style is this comment has not yet come up, to be studied

 

2. Freeze window

 

                       WritableWorkbook workbook = Workbook.createWorkbook (excelFile); // generates a workbook
                    WritableSheet sheet = workbook.createSheet ( "expansion Details", 0); // generating sheet, the sheet herein is a parameter name, the parameters for the two the first several working industry, the default starting from 0
                    SheetSettings SS = sheet.getSettings ();
                    ss.setHorizontalFreeze (2); // freeze two
                    ss.setVerticalFreeze (2); // freeze two lines

 

Guess you like

Origin www.cnblogs.com/zhangxiaozhen/p/11447664.html
jxl