亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? poi.txt

?? Jakarta POI 是apache的子項目
?? TXT
?? 第 1 頁 / 共 2 頁
字號:
1.創建工作簿 (WORKBOOK)
    HSSFWorkbook wb = new HSSFWorkbook();
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
2.創建工作表(SHEET)
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet1 = wb.createSheet("new sheet");
    HSSFSheet sheet2 = wb.createSheet("second sheet");
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
3.創建單元格(CELL)
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");    // Create a row and put some cells in it. Rows are 0 based.
    HSSFRow row = sheet.createRow((short)0);
    // Create a cell and put a value in it.
    HSSFCell cell = row.createCell((short)0);
    cell.setCellValue(1);    // Or do it on one line.
    row.createCell((short)1).setCellValue(1.2);
    row.createCell((short)2).setCellValue("This is a string");
    row.createCell((short)3).setCellValue(true);    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
4.創建指定單元格式的單元格
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");    // Create a row and put some cells in it. Rows are 0 based.
    HSSFRow row = sheet.createRow((short)0);    // Create a cell and put a date value in it. The first cell is not styled
    // as a date.
    HSSFCell cell = row.createCell((short)0);
    cell.setCellValue(new Date());    // we style the second cell as a date (and time). It is important to
    // create a new cell style from the workbook otherwise you can end up
    // modifying the built in style and effecting not only this cell but other cells.
    HSSFCellStyle cellStyle = wb.createCellStyle();
    cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy h:mm"));
    cell = row.createCell((short)1);
    cell.setCellValue(new Date());
    cell.setCellStyle(cellStyle);    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
5. 單元格的不同格式
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");
    HSSFRow row = sheet.createRow((short)2);
    row.createCell((short) 0).setCellValue(1.1);
    row.createCell((short) 1).setCellValue(new Date());
    row.createCell((short) 2).setCellValue("a string");
    row.createCell((short) 3).setCellValue(true);
    row.createCell((short) 4).setCellType(HSSFCell.CELL_TYPE_ERROR);    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
6.單元格的不同對齊方式
    public static void main(String[] args)
            throws IOException
    {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet sheet = wb.createSheet("new sheet");
        HSSFRow row = sheet.createRow((short) 2);
        createCell(wb, row, (short) 0, HSSFCellStyle.ALIGN_CENTER);
        createCell(wb, row, (short) 1, HSSFCellStyle.ALIGN_CENTER_SELECTION);
        createCell(wb, row, (short) 2, HSSFCellStyle.ALIGN_FILL);
        createCell(wb, row, (short) 3, HSSFCellStyle.ALIGN_GENERAL);
        createCell(wb, row, (short) 4, HSSFCellStyle.ALIGN_JUSTIFY);
        createCell(wb, row, (short) 5, HSSFCellStyle.ALIGN_LEFT);
        createCell(wb, row, (short) 6, HSSFCellStyle.ALIGN_RIGHT);        // Write the output to a file
        FileOutputStream fileOut = new FileOutputStream("workbook.xls");
        wb.write(fileOut);
        fileOut.close();    }
    /**
     * Creates a cell and aligns it a certain way.
     *
     * @param wb        the workbook
     * @param row       the row to create the cell in
     * @param column    the column number to create the cell in
     * @param align     the alignment for the cell.
     */
    private static void createCell(HSSFWorkbook wb, HSSFRow row, short column, short align)
    {
        HSSFCell cell = row.createCell(column);
        cell.setCellValue("Align It");
        HSSFCellStyle cellStyle = wb.createCellStyle();
        cellStyle.setAlignment(align);
        cell.setCellStyle(cellStyle);
    }
7.單元格的邊框設置
Working with borders
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");    // Create a row and put some cells in it. Rows are 0 based.
    HSSFRow row = sheet.createRow((short) 1);    // Create a cell and put a value in it.
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue(4);    // Style the cell with borders all around.
    HSSFCellStyle style = wb.createCellStyle();
    style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
    style.setBottomBorderColor(HSSFColor.BLACK.index);
    style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
    style.setLeftBorderColor(HSSFColor.GREEN.index);
    style.setBorderRight(HSSFCellStyle.BORDER_THIN);
    style.setRightBorderColor(HSSFColor.BLUE.index);
    style.setBorderTop(HSSFCellStyle.BORDER_MEDIUM_DASHED);
    style.setTopBorderColor(HSSFColor.BLACK.index);
    cell.setCellStyle(style);    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
8.填充和顏色設置
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");    // Create a row and put some cells in it. Rows are 0 based.
    HSSFRow row = sheet.createRow((short) 1);    // Aqua background
    HSSFCellStyle style = wb.createCellStyle();
    style.setFillBackgroundColor(HSSFColor.AQUA.index);
    style.setFillPattern(HSSFCellStyle.BIG_SPOTS);
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue("X");
    cell.setCellStyle(style);    // Orange "foreground", foreground being the fill foreground not the font color.
    style = wb.createCellStyle();
    style.setFillForegroundColor(HSSFColor.ORANGE.index);
    style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
    cell = row.createCell((short) 2);
    cell.setCellValue("X");
    cell.setCellStyle(style);    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
9.合并單元格操作
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");    HSSFRow row = sheet.createRow((short) 1);
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue("This is a test of merging");    sheet.addMergedRegion(new Region(1,(short)1,1,(short)2));    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
10.字體設置
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");    // Create a row and put some cells in it. Rows are 0 based.
    HSSFRow row = sheet.createRow((short) 1);    // Create a new font and alter it.
    HSSFFont font = wb.createFont();
    font.setFontHeightInPoints((short)24);
    font.setFontName("Courier New");
    font.setItalic(true);
    font.setStrikeout(true);    // Fonts are set into a style so create a new one to use.
    HSSFCellStyle style = wb.createCellStyle();
    style.setFont(font);    // Create a cell and put a value in it.
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue("This is a test of fonts");
    cell.setCellStyle(style);    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
11.自定義顏色
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet();
    HSSFRow row = sheet.createRow((short) 0);
    HSSFCell cell = row.createCell((short) 0);
    cell.setCellValue("Default Palette");    //apply some colors from the standard palette,
    // as in the previous examples.
    //we'll use red text on a lime background    HSSFCellStyle style = wb.createCellStyle();
    style.setFillForegroundColor(HSSFColor.LIME.index);
    style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);    HSSFFont font = wb.createFont();
    font.setColor(HSSFColor.RED.index);
    style.setFont(font);    cell.setCellStyle(style);    //save with the default palette
    FileOutputStream out = new FileOutputStream("default_palette.xls");
    wb.write(out);
    out.close();    //now, let's replace RED and LIME in the palette
    // with a more attractive combination
    // (lovingly borrowed from freebsd.org)    cell.setCellValue("Modified Palette");    //creating a custom palette for the workbook
    HSSFPalette palette = wb.getCustomPalette();    //replacing the standard red with freebsd.org red
    palette.setColorAtIndex(HSSFColor.RED.index,
            (byte) 153, //RGB red (0-255)
            (byte) 0,    //RGB green
            (byte) 0     //RGB blue
    );
    //replacing lime with freebsd.org gold
    palette.setColorAtIndex(HSSFColor.LIME.index, (byte) 255, (byte) 204, (byte) 102);    //save with the modified palette
    // note that wherever we have previously used RED or LIME, the
    // new colors magically appear
    out = new FileOutputStream("modified_palette.xls");
    wb.write(out);
    out.close();
12.讀和重寫EXCEL文件
    POIFSFileSystem fs      =
            new POIFSFileSystem(new FileInputStream("workbook.xls"));
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    HSSFSheet sheet = wb.getSheetAt(0);
    HSSFRow row = sheet.getRow(2);
    HSSFCell cell = row.getCell((short)3);
    if (cell == null)
        cell = row.createCell((short)3);
    cell.setCellType(HSSFCell.CELL_TYPE_STRING);
    cell.setCellValue("a test");    // Write the output to a file

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区二区| 日韩视频免费直播| 国产麻豆精品视频| 久久超碰97人人做人人爱| 日韩av网站在线观看| 青青草97国产精品免费观看| 日产国产欧美视频一区精品 | 日日噜噜夜夜狠狠视频欧美人| 中文字幕在线观看不卡视频| 亚洲欧美在线视频| 一级特黄大欧美久久久| 日韩高清在线电影| 精品一区二区三区影院在线午夜 | 亚洲一二三专区| 午夜精品久久久久久久久久| 天堂一区二区在线免费观看| 日本少妇一区二区| 国内精品免费在线观看| 国产黑丝在线一区二区三区| 91污在线观看| 5566中文字幕一区二区电影 | 欧美—级在线免费片| 国产精品蜜臀在线观看| 尤物在线观看一区| 日韩成人精品在线观看| 大陆成人av片| 欧美日韩视频第一区| 日韩欧美国产综合一区| 国产精品亲子乱子伦xxxx裸| 亚洲一区二区在线视频| 精品一区二区免费在线观看| 99久久伊人网影院| 欧美精品在线观看一区二区| 国产亚洲精品bt天堂精选| 亚洲欧美区自拍先锋| 久久av资源网| 91片黄在线观看| 精品99一区二区| 亚洲男人的天堂一区二区| 裸体一区二区三区| 91原创在线视频| 日韩一级片在线观看| 亚洲欧美二区三区| 国产一区二区伦理| 欧美日本一区二区在线观看| 国产精品乱子久久久久| 麻豆免费精品视频| 欧美亚洲一区二区在线| 国产精品素人一区二区| 免费人成在线不卡| 欧美伊人精品成人久久综合97| 国产欧美日韩综合精品一区二区| 亚洲电影第三页| 99国产精品国产精品毛片| 精品裸体舞一区二区三区| 亚洲午夜在线视频| eeuss鲁片一区二区三区在线看| 日韩精品中文字幕在线不卡尤物 | 久久久久久久综合狠狠综合| 日日夜夜免费精品视频| 在线免费视频一区二区| 国产精品福利电影一区二区三区四区| 麻豆成人久久精品二区三区红 | 福利视频网站一区二区三区| 精品欧美黑人一区二区三区| 日韩国产精品91| 欧美日韩在线综合| 亚洲综合男人的天堂| 色综合天天综合在线视频| 国产精品无遮挡| 99久久综合精品| 亚洲男人的天堂在线观看| 91麻豆国产自产在线观看| 中文字幕 久热精品 视频在线| 久久国产人妖系列| 日韩视频一区二区三区在线播放| 日本视频中文字幕一区二区三区| 制服丝袜激情欧洲亚洲| 日韩高清在线一区| 欧美哺乳videos| 久久99精品久久久久婷婷| 精品国产乱码久久久久久久久| 精品在线一区二区| 国产清纯在线一区二区www| 成人深夜视频在线观看| 国产精品美女久久久久久久久 | 亚洲欧洲日本在线| 91色porny蝌蚪| 一二三四区精品视频| 欧美人动与zoxxxx乱| 美美哒免费高清在线观看视频一区二区 | 欧美日韩国产一级| 蜜桃视频免费观看一区| 久久综合久色欧美综合狠狠| 国产露脸91国语对白| 亚洲视频在线一区| 欧美剧情片在线观看| 另类成人小视频在线| 久久精品人人爽人人爽| 99国产精品视频免费观看| 亚洲成人一区二区在线观看| 欧美一级理论性理论a| 国产一区二区三区日韩| √…a在线天堂一区| 欧美日韩在线不卡| 国产99久久久精品| 香蕉久久夜色精品国产使用方法| 亚洲精品在线电影| 日本韩国欧美三级| 久久精品噜噜噜成人88aⅴ| 综合亚洲深深色噜噜狠狠网站| 在线视频一区二区三区| 国产一区二区三区蝌蚪| **欧美大码日韩| 欧美成人bangbros| 在线观看免费亚洲| 国产激情视频一区二区在线观看| 亚洲男人的天堂av| 国产亚洲午夜高清国产拍精品| 在线视频一区二区三区| 国产精品自拍一区| 天天影视色香欲综合网老头| 国产午夜精品久久| 欧美一区二区三区啪啪| 91蜜桃传媒精品久久久一区二区| 久久超级碰视频| 午夜视频一区在线观看| 综合中文字幕亚洲| 欧美韩国一区二区| 欧美精品一区二区三区蜜桃| 欧美三级视频在线播放| 91国偷自产一区二区三区观看 | 欧美视频一二三区| 粉嫩一区二区三区在线看| 蜜臀va亚洲va欧美va天堂| 亚洲综合在线视频| 亚洲免费观看高清完整版在线观看 | 欧美一级欧美一级在线播放| 日本福利一区二区| av一区二区三区在线| 成人在线一区二区三区| 国产一区二区三区日韩| 秋霞午夜av一区二区三区| 夜夜嗨av一区二区三区中文字幕 | 国产人成亚洲第一网站在线播放| 日韩免费高清电影| 日韩三级中文字幕| 91麻豆精品久久久久蜜臀| 欧美区视频在线观看| 欧美久久一二三四区| 欧美日韩一区二区三区在线| 日本韩国精品一区二区在线观看| 91视频xxxx| 色老汉av一区二区三区| 在线观看中文字幕不卡| 在线免费视频一区二区| 欧美日韩一区二区三区视频| 色悠悠久久综合| 欧洲精品一区二区| 欧美日韩中文精品| 日韩一级成人av| 久久久精品2019中文字幕之3| 久久精品男人天堂av| 国产精品欧美久久久久无广告| 国产日韩欧美亚洲| 国产精品对白交换视频| 亚洲精品欧美在线| 日本一道高清亚洲日美韩| 麻豆久久久久久| 国产成a人无v码亚洲福利| www.日本不卡| 一本久久a久久免费精品不卡| 91精彩视频在线观看| 91精品婷婷国产综合久久性色| 欧美大片一区二区| 国产精品美女久久福利网站| 亚洲免费av高清| 免费国产亚洲视频| 成人av在线资源网站| 欧美色手机在线观看| 精品少妇一区二区三区日产乱码 | 丝袜亚洲精品中文字幕一区| 久久精品国产秦先生| 波多野结衣亚洲| 337p亚洲精品色噜噜| 国产视频不卡一区| 亚洲成人av一区| 国产成人免费视频网站 | 91精品福利在线| 精品久久久久久久久久久久久久久 | 欧美日韩一级片在线观看| 日韩一区二区三区高清免费看看| 亚洲国产经典视频| 亚洲r级在线视频| 国产成人欧美日韩在线电影| 欧美三级午夜理伦三级中视频| 久久久久久麻豆| 日本欧美一区二区| 色婷婷av久久久久久久| 欧美激情中文字幕|