exce的操作

设置打印标题行:

    private void setPrintTitle( IWorkBook workbook, List<String> sheetNames,
            int startRow, int endRow ) throws Exception
    {
        int index = 0;
        
        for ( String sheetName : sheetNames )
    
        {
            index = workbook.getSheetIndex( sheetName );
            workbook.setRepeatingRowsAndColumns( index, -1, -1, startRow,
                    endRow );
        }
    }

你可能感兴趣的:(操作)