{"id":707,"date":"2023-08-25T15:59:36","date_gmt":"2023-04-10T23:10:09","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/index.php\/2023\/11\/30\/apache-poi-%e6%95%99%e7%a8%8b\/"},"modified":"2025-08-03T04:09:31","modified_gmt":"2025-08-02T20:09:31","slug":"apache-poi-%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/","title":{"rendered":"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357"},"content":{"rendered":"<p>\u8fd9\u662f\u6587\u7ae0\u300aApache POI \u6559\u7a0b\u300b\u7684\u7b2c1\u90e8\u5206\uff08\u51714\u90e8\u5206\uff09\u3002<\/p>\n<p>\u6b22\u8fce\u6765\u5230Apache POI\u6559\u7a0b\u3002\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u4eceMicrosoft Excel\u6587\u4ef6\u4e2d\u8bfb\u53d6\u6570\u636e\uff0c\u6216\u8005\u9700\u8981\u751f\u6210Excel\u683c\u5f0f\u7684\u62a5\u8868\uff0c\u4e3b\u8981\u7528\u4e8e\u5546\u4e1a\u6216\u91d1\u878d\u76ee\u7684\u3002Java\u672c\u8eab\u4e0d\u63d0\u4f9b\u4e0eExcel\u6587\u4ef6\u7684\u5de5\u4f5c\u652f\u6301\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u5bfb\u627e\u5f00\u6e90API\u6765\u5b8c\u6210\u8fd9\u4e2a\u4efb\u52a1\u3002\u5f53\u6211\u5f00\u59cb\u5bfb\u627eJava\u5904\u7406Excel\u7684API\u65f6\uff0c\u5927\u90e8\u5206\u4eba\u63a8\u8350JExcel\u6216Apache POI\u3002\u7ecf\u8fc7\u8fdb\u4e00\u6b65\u7684\u7814\u7a76\uff0c\u6211\u53d1\u73b0Apache POI\u662f\u9996\u9009\u7684\u4e3b\u8981\u539f\u56e0\u3002\u8fd8\u6709\u4e00\u4e9b\u9ad8\u7ea7\u7279\u6027\u76f8\u5173\u7684\u5176\u4ed6\u539f\u56e0\uff0c\u4f46\u6211\u4eec\u4e0d\u9700\u8981\u53bb\u6df1\u5165\u8be6\u7ec6\u8ba8\u8bba\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Apache\u57fa\u91d1\u4f1a\u7684\u652f\u6301\u3002<\/li>\n<li>JExcel\u4e0d\u652f\u6301xlsx\u683c\u5f0f\uff0c\u800cPOI\u540c\u65f6\u652f\u6301xls\u548cxlsx\u683c\u5f0f\u3002<\/li>\n<li>Apache POI\u63d0\u4f9b\u57fa\u4e8e\u6d41\u7684\u5904\u7406\uff0c\u9002\u5408\u5927\u6587\u4ef6\u5904\u7406\u4e14\u9700\u8981\u8f83\u5c11\u7684\u5185\u5b58\u3002<\/li>\n<\/ul>\n<h2>Apache POI \u662f\u4e00\u4e2a\u7528\u4e8e\u8bfb\u5199 Microsoft Office \u683c\u5f0f\u6587\u4ef6\u7684 Java \u5e93\u3002Apache POI\u5728\u5904\u7406Microsoft Excel\u6587\u6863\u65b9\u9762\u63d0\u4f9b\u4e86\u51fa\u8272\u7684\u652f\u6301\u3002Apache POI\u80fd\u591f\u5904\u7406\u7535\u5b50\u8868\u683c\u7684XLS\u548cXLSX\u683c\u5f0f\u3002\u6709\u5173Apache POI API\u7684\u4e00\u4e9b\u91cd\u8981\u8981\u70b9\u662f\uff1a<\/h2>\n<ol>\n<li>Apache POI\u5305\u542b\u5bf9Excel &#8217;97(-2007)\u6587\u4ef6\u683c\u5f0f\uff08\u5373XLS\uff09\u7684HSSF\u5b9e\u73b0\u3002<\/li>\n<li>\u5bf9\u4e8eExcel 2007 OOXML\uff08.xlsx\uff09\u6587\u4ef6\u683c\u5f0f\uff0c\u5e94\u4f7f\u7528Apache POI XSSF\u5b9e\u73b0\u3002<\/li>\n<li>Apache POI HSSF\u548cXSSF API\u63d0\u4f9b\u4e86\u8bfb\u53d6\u3001\u5199\u5165\u6216\u4fee\u6539\u7535\u5b50\u8868\u683c\u7684\u673a\u5236\u3002<\/li>\n<li>Apache POI\u8fd8\u63d0\u4f9b\u4e86SXSSF API\uff0c\u5b83\u662fXSSF\u7684\u6269\u5c55\uff0c\u7528\u4e8e\u5904\u7406\u975e\u5e38\u5927\u7684Excel\u8868\u683c\u3002<\/li>\n<li>SXSSF API\u9700\u8981\u8f83\u5c11\u7684\u5185\u5b58\uff0c\u5728\u5904\u7406\u975e\u5e38\u5927\u7684\u7535\u5b50\u8868\u683c\u4e14\u5806\u5185\u5b58\u6709\u9650\u65f6\u7279\u522b\u9002\u7528\u3002<\/li>\n<li>\u6709\u4e24\u79cd\u6a21\u578b\u53ef\u4f9b\u9009\u62e9 &#8211; \u4e8b\u4ef6\u6a21\u578b\u548c\u7528\u6237\u6a21\u578b\u3002\u4e8b\u4ef6\u6a21\u578b\u9700\u8981\u8f83\u5c11\u7684\u5185\u5b58\uff0c\u56e0\u4e3aExcel\u6587\u4ef6\u4ee5\u6807\u8bb0\u5f62\u5f0f\u88ab\u8bfb\u53d6\u5e76\u9700\u8981\u8fdb\u884c\u5904\u7406\u3002\u7528\u6237\u6a21\u578b\u66f4\u52a0\u9762\u5411\u5bf9\u8c61\u4e14\u6613\u4e8e\u4f7f\u7528\uff0c\u6211\u4eec\u5c06\u5728\u793a\u4f8b\u4e2d\u4f7f\u7528\u5b83\u3002<\/li>\n<li>Apache POI\u5bf9\u989d\u5916\u7684Excel\u529f\u80fd\u63d0\u4f9b\u4e86\u51fa\u8272\u7684\u652f\u6301\uff0c\u4f8b\u5982\u4f7f\u7528\u516c\u5f0f\u3001\u901a\u8fc7\u586b\u5145\u989c\u8272\u548c\u8fb9\u6846\u3001\u5b57\u4f53\u3001\u9875\u7709\u548c\u9875\u811a\u3001\u6570\u636e\u9a8c\u8bc1\u3001\u56fe\u7247\u3001\u8d85\u94fe\u63a5\u7b49\u521b\u5efa\u5355\u5143\u683c\u6837\u5f0f\u3002<\/li>\n<\/ol>\n<h3>Apache POI Maven \u4f9d\u8d56\u9879<\/h3>\n<p>\u5982\u679c\u4f60\u5728\u4f7f\u7528Maven\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u7684Apache POI\u4f9d\u8d56\u9879\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.apache.poi&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;poi&lt;\/artifactId&gt;\r\n\t&lt;version&gt;3.10-FINAL&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.apache.poi&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;poi-ooxml&lt;\/artifactId&gt;\r\n\t&lt;version&gt;3.10-FINAL&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<p>\u76ee\u524d\u7684Apache POI\u7248\u672c\u662f3.10-FINAL\u3002\u5982\u679c\u60a8\u4f7f\u7528\u72ec\u7acb\u7684Java\u5e94\u7528\u7a0b\u5e8f\uff0c\u8bf7\u5305\u542b\u4e0b\u65b9\u56fe\u7247\u4e2d\u7684Jars\u3002<\/p>\n<h3>Apache POI \u793a\u4f8b &#8211; \u8bfb\u53d6 Excel \u6587\u4ef6<\/h3>\n<p>\u8fd9\u662f\u6587\u7ae0\u300aApache POI \u6559\u7a0b\u300b\u7684\u7b2c2\u90e8\u5206\uff08\u51714\u90e8\u5206\uff09\u3002<\/p>\n<p>\u5185\u5bb9\u7247\u6bb5\uff1a\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u540d\u4e3a&#8221;Sample.xlsx&#8221;\u7684Excel\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u4e24\u4e2a\u5de5\u4f5c\u8868\uff0c\u6570\u636e\u5982\u4e0b\u56fe\u6240\u793a\u3002\u6211\u4eec\u60f3\u8981\u8bfb\u53d6\u8fd9\u4e2aExcel\u6587\u4ef6\uff0c\u5e76\u521b\u5efa\u4e00\u4e2a\u56fd\u5bb6\u5217\u8868\u3002\u5c3d\u7ba1\u5728\u89e3\u6790\u8fc7\u7a0b\u4e2dSheet1\u6709\u4e00\u4e9b\u989d\u5916\u7684\u6570\u636e\uff0c\u4f46\u6211\u4eec\u4f1a\u5ffd\u7565\u5b83\u3002\u6211\u4eec\u7684\u56fd\u5bb6Java Bean\u4ee3\u7801\u5982\u4e0b\uff1aCountry.java<\/p>\n<pre class=\"post-pre\"><code>package com.Olivia.excel.read;\r\n\r\npublic class Country {\r\n\r\n\tprivate String name;\r\n\tprivate String shortCode;\r\n\t\r\n\tpublic Country(String n, String c){\r\n\t\tthis.name=n;\r\n\t\tthis.shortCode=c;\r\n\t}\r\n\t\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}\r\n\tpublic void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}\r\n\tpublic String getShortCode() {\r\n\t\treturn shortCode;\r\n\t}\r\n\tpublic void setShortCode(String shortCode) {\r\n\t\tthis.shortCode = shortCode;\r\n\t}\r\n\t\r\n\t@Override\r\n\tpublic String toString(){\r\n\t\treturn name + \"::\" + shortCode;\r\n\t}\r\n\t\r\n}\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Apache POI\u5e93\u7684\u793a\u4f8b\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u5c06Excel\u6587\u4ef6\u8bfb\u53d6\u4e3a\u56fd\u5bb6\u5217\u8868\u3002ReadExcelFileToList.java\uff1a<\/p>\n<pre class=\"post-pre\"><code>package com.Olivia.excel.read;\r\n\r\nimport java.io.FileInputStream;\r\nimport java.io.IOException;\r\nimport java.util.ArrayList;\r\nimport java.util.Iterator;\r\nimport java.util.List;\r\n\r\nimport org.apache.poi.hssf.usermodel.HSSFWorkbook;\r\nimport org.apache.poi.ss.usermodel.Cell;\r\nimport org.apache.poi.ss.usermodel.Row;\r\nimport org.apache.poi.ss.usermodel.Sheet;\r\nimport org.apache.poi.ss.usermodel.Workbook;\r\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\r\n\r\npublic class ReadExcelFileToList {\r\n\r\n\tpublic static List&lt;Country&gt; readExcelData(String fileName) {\r\n\t\tList&lt;Country&gt; countriesList = new ArrayList&lt;Country&gt;();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\/\/\u4ecexlsx\/xls\u6587\u4ef6\u521b\u5efa\u8f93\u5165\u6d41\r\n\t\t\tFileInputStream fis = new FileInputStream(fileName);\r\n\t\t\t\r\n\t\t\t\/\/\u4e3axlsx\/xls\u6587\u4ef6\u8f93\u5165\u6d41\u521b\u5efaWorkbook\u5b9e\u4f8b\r\n\t\t\tWorkbook workbook = null;\r\n\t\t\tif(fileName.toLowerCase().endsWith(\"xlsx\")){\r\n\t\t\t\tworkbook = new XSSFWorkbook(fis);\r\n\t\t\t}else if(fileName.toLowerCase().endsWith(\"xls\")){\r\n\t\t\t\tworkbook = new HSSFWorkbook(fis);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\/\/\u83b7\u53d6xlsx\u6587\u4ef6\u4e2d\u7684\u5de5\u4f5c\u8868\u6570\u91cf\r\n\t\t\tint numberOfSheets = workbook.getNumberOfSheets();\r\n\t\t\t\r\n\t\t\t\/\/\u904d\u5386\u6bcf\u4e2a\u5de5\u4f5c\u8868\r\n\t\t\tfor(int i=0; i &lt; numberOfSheets; i++){\r\n\t\t\t\t\r\n\t\t\t\t\/\/\u4ece\u5de5\u4f5c\u7c3f\u4e2d\u83b7\u53d6\u7b2cn\u4e2a\u5de5\u4f5c\u8868\r\n\t\t\t\tSheet sheet = workbook.getSheetAt(i);\r\n\t\t\t\t\r\n\t\t\t\t\/\/\u6bcf\u4e2a\u5de5\u4f5c\u8868\u90fd\u6709\u884c\uff0c\u904d\u5386\u5b83\u4eec\r\n\t\t\t\tIterator&lt;Row&gt; rowIterator = sheet.iterator();\r\n\t\t\t\twhile (rowIterator.hasNext()) \r\n\t\t        {\r\n\t\t\t\t\tString name = \"\";\r\n\t\t\t\t\tString shortCode = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\/\/\u83b7\u53d6\u884c\u5bf9\u8c61\r\n\t\t\t\t\tRow row = rowIterator.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\/\/\u6bcf\u884c\u90fd\u6709\u5217\uff0c\u83b7\u53d6\u5217\u8fed\u4ee3\u5668\u5e76\u904d\u5386\u5b83\u4eec\r\n\t\t\t\t\tIterator&lt;Cell&gt; cellIterator = row.cellIterator();\r\n\t\t             \r\n\t\t            while (cellIterator.hasNext()) \r\n\t\t            {\r\n\t\t            \t\/\/\u83b7\u53d6\u5355\u5143\u683c\u5bf9\u8c61\r\n\t\t            \tCell cell = cellIterator.next();\r\n\t\t            \t\r\n\t\t            \t\/\/\u68c0\u67e5\u5355\u5143\u683c\u7c7b\u578b\u5e76\u76f8\u5e94\u5904\u7406\r\n\t\t            \tswitch(cell.getCellType()){\r\n\t\t            \tcase Cell.CELL_TYPE_STRING:\r\n\t\t\t\t\t\tif(shortCode.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\t\t\tshortCode = cell.getStringCellValue().trim();\r\n\t\t\t\t\t\t}else if(name.equalsIgnoreCase(\"\")){\r\n\t\t\t\t\t\t\t\/\/\u7b2c\u4e8c\u5217\r\n\t\t\t\t\t\t\tname = cell.getStringCellValue().trim();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\/\/\u968f\u673a\u6570\u636e\uff0c\u5ffd\u7565\u5b83\r\n\t\t\t\t\t\t\tSystem.out.println(\"\u968f\u673a\u6570\u636e::\"+cell.getStringCellValue());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t            \tcase Cell.CELL_TYPE_NUMERIC:\r\n\t\t\t\t\t\tSystem.out.println(\"\u968f\u673a\u6570\u636e::\"+cell.getNumericCellValue());\r\n\t\t            \t}\r\n\t\t            } \/\/\u5355\u5143\u683c\u8fed\u4ee3\u5668\u7ed3\u675f\r\n\t\t            Country c = new Country(name, shortCode);\r\n\t\t            countriesList.add(c);\r\n\t\t        } \/\/\u884c\u8fed\u4ee3\u5668\u7ed3\u675f\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} \/\/\u5de5\u4f5c\u8868for\u5faa\u73af\u7ed3\u675f\r\n\t\t\t\r\n\t\t\t\/\/\u5173\u95ed\u6587\u4ef6\u8f93\u5165\u6d41\r\n\t\t\tfis.close();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn countriesList;\r\n\t}\r\n\r\n\tpublic static void main(String args[]){\r\n\t\tList&lt;Country&gt; list = readExcelData(\"Sample.xlsx\");\r\n\t\tSystem.out.println(\"\u56fd\u5bb6\u5217\u8868\\n\"+list);\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u7a0b\u5e8f\u975e\u5e38\u5bb9\u6613\u7406\u89e3\uff0c\u5305\u62ec\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u57fa\u4e8e\u6587\u4ef6\u7c7b\u578b\u521b\u5efaWorkbook\u5b9e\u4f8b\u3002\u5bf9\u4e8exlsx\u683c\u5f0f\uff0c\u4f7f\u7528XSSFWorkbook\uff0c\u5bf9\u4e8exls\u683c\u5f0f\uff0c\u4f7f\u7528HSSFWorkbook\u3002\u6ce8\u610f\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5de5\u5382\u6a21\u5f0f\u521b\u5efa\u4e00\u4e2a\u5305\u88c5\u5668\u7c7b\uff0c\u6839\u636e\u6587\u4ef6\u540d\u6765\u83b7\u53d6Workbook\u5b9e\u4f8b\u3002<\/li>\n<li>\u4f7f\u7528workbook\u7684getNumberOfSheets()\u65b9\u6cd5\u83b7\u53d6\u8868\u683c\u7684\u6570\u91cf\uff0c\u7136\u540e\u4f7f\u7528for\u5faa\u73af\u89e3\u6790\u6bcf\u4e2a\u8868\u683c\u3002\u4f7f\u7528getSheetAt(int i)\u65b9\u6cd5\u83b7\u53d6Sheet\u5b9e\u4f8b\u3002<\/li>\n<li>\u83b7\u53d6Row\u8fed\u4ee3\u5668\uff0c\u7136\u540e\u83b7\u53d6Cell\u8fed\u4ee3\u5668\u4ee5\u83b7\u53d6Cell\u5bf9\u8c61\u3002Apache POI\u5728\u8fd9\u91cc\u4f7f\u7528\u4e86\u8fed\u4ee3\u5668\u6a21\u5f0f\u3002<\/li>\n<li>\u4f7f\u7528switch-case\u8bed\u53e5\u8bfb\u53d6Cell\u7684\u7c7b\u578b\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\u3002<\/li>\n<\/ol>\n<p>\u73b0\u5728\uff0c\u5f53\u6211\u4eec\u8fd0\u884c\u4e0a\u8ff0 Apache POI \u793a\u4f8b\u7a0b\u5e8f\u65f6\uff0c\u5b83\u4f1a\u5728\u63a7\u5236\u53f0\u4e0a\u751f\u6210\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n<pre class=\"post-pre\"><code>\u968f\u673a\u6570\u636e::1.0\r\n\u968f\u673a\u6570\u636e::2.0\r\n\u968f\u673a\u6570\u636e::3.0\r\n\u968f\u673a\u6570\u636e::4.0\r\n\u56fd\u5bb6\u5217\u8868\r\n[India::IND, Afghanistan::AFG, United States of America::USA, Anguilla::AIA, \r\nDenmark::DNK, Dominican Republic::DOM, Algeria::DZA, Ecuador::ECU]\r\n<\/code><\/pre>\n<h3>Apache POI \u793a\u4f8b &#8211; \u5199\u5165 Excel \u6587\u4ef6<\/h3>\n<p>\u8fd9\u662f\u6587\u7ae0\u300aApache POI \u6559\u7a0b\u300b\u7684\u7b2c3\u90e8\u5206\uff08\u51714\u90e8\u5206\uff09\u3002<\/p>\n<p>\u5185\u5bb9\u7247\u6bb5\uff1a\u4f7f\u7528Apache POI\u7f16\u5199Excel\u6587\u4ef6\u4e0e\u8bfb\u53d6\u7c7b\u4f3c\uff0c\u53ea\u662f\u5728\u8fd9\u91cc\u6211\u4eec\u9996\u5148\u521b\u5efa\u5de5\u4f5c\u7c3f\u3002\u7136\u540e\u8bbe\u7f6e\u5de5\u4f5c\u8868\u3001\u884c\u548c\u5355\u5143\u683c\u7684\u503c\uff0c\u5e76\u4f7f\u7528FileOutputStream\u5c06\u5176\u5199\u5165\u6587\u4ef6\u3002\u8ba9\u6211\u4eec\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684Apache POI\u793a\u4f8b\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5\u4e2d\u7684\u56fd\u5bb6\u5217\u8868\u5c06\u5176\u4fdd\u5b58\u5230\u53e6\u4e00\u4e2a\u6587\u4ef6\u4e2d\u7684\u5355\u4e2a\u5de5\u4f5c\u8868\u4e2d\u3002WriteListToExcelFile.java<\/p>\n<pre class=\"post-pre\"><code>package com.Olivia.excel.read;\r\n\r\nimport java.io.FileOutputStream;\r\nimport java.util.Iterator;\r\nimport java.util.List;\r\n\r\nimport org.apache.poi.hssf.usermodel.HSSFWorkbook;\r\nimport org.apache.poi.ss.usermodel.Cell;\r\nimport org.apache.poi.ss.usermodel.Row;\r\nimport org.apache.poi.ss.usermodel.Sheet;\r\nimport org.apache.poi.ss.usermodel.Workbook;\r\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\r\n\r\npublic class WriteListToExcelFile {\r\n\r\n\tpublic static void writeCountryListToFile(String fileName, List&lt;Country&gt; countryList) throws Exception{\r\n\t\tWorkbook workbook = null;\r\n\t\t\r\n\t\tif(fileName.endsWith(\"xlsx\")){\r\n\t\t\tworkbook = new XSSFWorkbook();\r\n\t\t}else if(fileName.endsWith(\"xls\")){\r\n\t\t\tworkbook = new HSSFWorkbook();\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"invalid file name, should be xls or xlsx\");\r\n\t\t}\r\n\t\t\r\n\t\tSheet sheet = workbook.createSheet(\"Countries\");\r\n\t\t\r\n\t\tIterator&lt;Country&gt; iterator = countryList.iterator();\r\n\t\t\r\n\t\tint rowIndex = 0;\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tCountry country = iterator.next();\r\n\t\t\tRow row = sheet.createRow(rowIndex++);\r\n\t\t\tCell cell0 = row.createCell(0);\r\n\t\t\tcell0.setCellValue(country.getName());\r\n\t\t\tCell cell1 = row.createCell(1);\r\n\t\t\tcell1.setCellValue(country.getShortCode());\r\n\t\t}\r\n\t\t\r\n\t\t\/\/lets write the excel data to file now\r\n\t\tFileOutputStream fos = new FileOutputStream(fileName);\r\n\t\tworkbook.write(fos);\r\n\t\tfos.close();\r\n\t\tSystem.out.println(fileName + \" written successfully\");\r\n\t}\r\n\t\r\n\tpublic static void main(String args[]) throws Exception{\r\n\t\tList&lt;Country&gt; list = ReadExcelFileToList.readExcelData(\"Sample.xlsx\");\r\n\t\tWriteListToExcelFile.writeCountryListToFile(\"Countries.xls\", list);\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u5f53\u6211\u4eec\u6267\u884c\u4e0a\u8ff0Apache POI\u793a\u4f8b\u7a0b\u5e8f\u65f6\uff0c\u751f\u6210\u7684Excel\u6587\u4ef6\u770b\u8d77\u6765\u5982\u4e0b\u6240\u793a\u7684\u56fe\u7247\u3002<\/p>\n<h3>Apache POI\u793a\u4f8b &#8211; \u8bfb\u53d6Excel\u516c\u5f0f<\/h3>\n<p>\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u5904\u7406\u5305\u542b\u516c\u5f0f\u7684\u590d\u6742Excel\u6587\u4ef6\uff0c\u8ba9\u6211\u4eec\u6765\u770b\u4e00\u4e2a\u4f7f\u7528\u7b80\u5355Apache POI\u7684\u4f8b\u5b50\uff0c\u6765\u8bfb\u53d6\u5e26\u6709\u5176\u503c\u7684\u5355\u5143\u683c\u7684\u516c\u5f0f\u3002ReadExcelFormula.java<\/p>\n<pre class=\"post-pre\"><code>package com.Olivia.excel.read;\r\n\r\nimport java.io.FileInputStream;\r\nimport java.io.IOException;\r\nimport java.util.Iterator;\r\n\r\nimport org.apache.poi.ss.usermodel.Cell;\r\nimport org.apache.poi.ss.usermodel.Row;\r\nimport org.apache.poi.ss.usermodel.Sheet;\r\nimport org.apache.poi.ss.usermodel.Workbook;\r\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\r\n\r\npublic class ReadExcelFormula {\r\n\r\n\tpublic static void readExcelFormula(String fileName) throws IOException{\r\n\t\t\r\n\t\tFileInputStream fis = new FileInputStream(fileName);\r\n\t\t\r\n\t\t\/\/assuming xlsx file\r\n\t\tWorkbook workbook = new XSSFWorkbook(fis);\r\n\t\tSheet sheet = workbook.getSheetAt(0);\r\n\t\tIterator&lt;Row&gt; rowIterator = sheet.iterator();\r\n\t\twhile (rowIterator.hasNext()) \r\n        {\r\n\t\t\tRow row = rowIterator.next();\r\n\t\t\tIterator&lt;Cell&gt; cellIterator = row.cellIterator();\r\n            \r\n            while (cellIterator.hasNext()) \r\n            {\r\n            \tCell cell = cellIterator.next();\r\n            \tswitch(cell.getCellType()){\r\n            \tcase Cell.CELL_TYPE_NUMERIC:\r\n            \t\tSystem.out.println(cell.getNumericCellValue());\r\n            \t\tbreak;\r\n            \tcase Cell.CELL_TYPE_FORMULA:\r\n            \t\tSystem.out.println(\"Cell Formula=\"+cell.getCellFormula());\r\n            \t\tSystem.out.println(\"Cell Formula Result Type=\"+cell.getCachedFormulaResultType());\r\n            \t\tif(cell.getCachedFormulaResultType() == Cell.CELL_TYPE_NUMERIC){\r\n            \t\t\tSystem.out.println(\"Formula Value=\"+cell.getNumericCellValue());\r\n            \t\t}\r\n            \t}\r\n            }\r\n        }\r\n\t}\r\n\t\r\n\tpublic static void main(String args[]) throws IOException {\r\n\t\treadExcelFormula(\"FormulaMultiply.xlsx\");\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u5f53\u6211\u4eec\u6267\u884c\u4ee5\u4e0aApache POI\u793a\u4f8b\u7a0b\u5e8f\u65f6\uff0c\u6211\u4eec\u4f1a\u5f97\u5230\u4ee5\u4e0b\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<pre class=\"post-pre\"><code>1.0\r\n2.0\r\n3.0\r\n4.0\r\n\u5355\u5143\u683c\u516c\u5f0f=A1*A2*A3*A4\r\n\u5355\u5143\u683c\u516c\u5f0f\u7ed3\u679c\u7c7b\u578b=0\r\n\u516c\u5f0f\u503c=24.0\r\n<\/code><\/pre>\n<h3>Apache POI\u793a\u4f8b &#8211; Excel\u5199\u5165\u516c\u5f0f<\/h3>\n<p>\u8fd9\u662f\u6587\u7ae0\u300aApache POI \u6559\u7a0b\u300b\u7684\u7b2c4\u90e8\u5206\uff08\u51714\u90e8\u5206\uff09\u3002<\/p>\n<p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u8ba1\u7b97\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u5199\u5165\u5355\u5143\u683c\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Excel\u516c\u5f0f\u6765\u8fdb\u884c\u8ba1\u7b97\uff0c\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\uff0c\u5982\u679c\u8ba1\u7b97\u4e2d\u6d89\u53ca\u7684\u5355\u5143\u683c\u503c\u53d1\u751f\u53d8\u5316\uff0c\u7ed3\u679c\u4f1a\u81ea\u52a8\u66f4\u65b0\uff0c\u4ece\u800c\u786e\u4fdd\u8ba1\u7b97\u7684\u51c6\u786e\u6027\u548c\u5b9e\u65f6\u6027\u3002\u4e0b\u9762\u8ba9\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u7b80\u5355\u793a\u4f8b\uff0c\u5b66\u4e60\u5982\u4f55\u4f7f\u7528Apache POI API\u521b\u5efa\u5e26\u6709\u516c\u5f0f\u7684Excel\u6587\u4ef6\uff0c\u8be5\u793a\u4f8b\u7c7b\u547d\u540d\u4e3aWriteExcelWithFormula.java\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.Olivia.excel.read;\r\n\r\nimport java.io.FileOutputStream;\r\nimport java.io.IOException;\r\n\r\nimport org.apache.poi.ss.usermodel.Row;\r\nimport org.apache.poi.ss.usermodel.Sheet;\r\nimport org.apache.poi.ss.usermodel.Workbook;\r\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\r\n\r\npublic class WriteExcelWithFormula {\r\n\r\n\tpublic static void writeExcelWithFormula(String fileName) throws IOException{\r\n\t\t\/\/ \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5de5\u4f5c\u7c3f\r\n\t\tWorkbook workbook = new XSSFWorkbook();\r\n\t\t\/\/ \u521b\u5efa\u540d\u4e3a\"Numbers\"\u7684\u5de5\u4f5c\u8868\r\n\t\tSheet sheet = workbook.createSheet(\"Numbers\");\r\n\t\t\/\/ \u521b\u5efa\u7b2c\u4e00\u884c\r\n\t\tRow row = sheet.createRow(0);\r\n\t\t\/\/ \u5728\u5355\u5143\u683c\u4e2d\u8bbe\u7f6e\u6570\u503c\r\n\t\trow.createCell(0).setCellValue(10);\r\n\t\trow.createCell(1).setCellValue(20);\r\n\t\trow.createCell(2).setCellValue(30);\r\n\t\t\/\/ \u8bbe\u7f6e\u516c\u5f0f\u5355\u5143\u683c\r\n\t\trow.createCell(3).setCellFormula(\"A1*B1*C1\");\r\n\t\t\r\n\t\t\/\/ \u5c06\u5de5\u4f5c\u7c3f\u5199\u5165\u6587\u4ef6\r\n\t\tFileOutputStream fos = new FileOutputStream(fileName);\r\n\t\tworkbook.write(fos);\r\n\t\tfos.close();\r\n\t\tSystem.out.println(fileName + \" \u6587\u4ef6\u5199\u5165\u6210\u529f\");\r\n\t}\r\n\t\r\n\tpublic static void main(String[] args) throws IOException {\r\n\t\twriteExcelWithFormula(\"Formulas.xlsx\");\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u4e0a\u8ff0Apache POI API\u793a\u4f8b\u7a0b\u5e8f\u751f\u6210\u7684Excel\u6587\u4ef6\u6548\u679c\u5982\u4e0b\u56fe\u6240\u793a\u3002\u81f3\u6b64\uff0c\u6211\u4eec\u5df2\u7ecf\u5b8c\u6210\u4e86\u5173\u4e8e\u4f7f\u7528Apache POI\u5904\u7406Excel\u6587\u4ef6\u7684\u5b8c\u6574\u6559\u7a0b\u3002\u82e5\u60f3\u4e86\u89e3\u66f4\u591a\u529f\u80fd\uff0c\u5efa\u8bae\u67e5\u9605Apache POI\u7c7b\u4e2d\u7684\u5404\u79cd\u65b9\u6cd5\u3002\u53c2\u8003\u8d44\u6599\uff1aApache POI\u5f00\u53d1\u8005\u6307\u5357\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u6587\u7ae0\u300aApache POI \u6559\u7a0b\u300b\u7684\u7b2c1\u90e8\u5206\uff08\u51714\u90e8\u5206\uff09\u3002 \u6b22\u8fce\u6765\u5230Apache POI\u6559\u7a0b\u3002\u6709\u65f6\u5019\u6211\u4eec\u9700 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1952,1953,1954],"class_list":["post-707","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-apache-poi","tag-java-excel","tag-java-office"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecdApache POI\u5e93\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5305\u62ecJava\u8bfb\u53d6\u3001\u5199\u5165Excel\u6587\u4ef6\uff0c\u64cd\u4f5cWord\u6587\u6863\u548cPowerPoint\u6f14\u793a\u6587\u7a3f\u7684\u5b8c\u6574\u793a\u4f8b\u3002\u9002\u5408Java\u5f00\u53d1\u8005\u5b66\u4e60Office\u6587\u6863\u5904\u7406\u6280\u672f\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-\u6559\u7a0b\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecdApache POI\u5e93\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5305\u62ecJava\u8bfb\u53d6\u3001\u5199\u5165Excel\u6587\u4ef6\uff0c\u64cd\u4f5cWord\u6587\u6863\u548cPowerPoint\u6f14\u793a\u6587\u7a3f\u7684\u5b8c\u6574\u793a\u4f8b\u3002\u9002\u5408Java\u5f00\u53d1\u8005\u5b66\u4e60Office\u6587\u6863\u5904\u7406\u6280\u672f\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-\u6559\u7a0b\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-10T23:10:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-02T20:09:31+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u9896\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u9896\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/\",\"name\":\"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-04-10T23:10:09+00:00\",\"dateModified\":\"2025-08-02T20:09:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\"},\"description\":\"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecdApache POI\u5e93\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5305\u62ecJava\u8bfb\u53d6\u3001\u5199\u5165Excel\u6587\u4ef6\uff0c\u64cd\u4f5cWord\u6587\u6863\u548cPowerPoint\u6f14\u793a\u6587\u7a3f\u7684\u5b8c\u6574\u793a\u4f8b\u3002\u9002\u5408Java\u5f00\u53d1\u8005\u5b66\u4e60Office\u6587\u6863\u5904\u7406\u6280\u672f\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\",\"name\":\"\u79d1, \u9896\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u9896\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357 - Blog - Silicon Cloud","description":"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecdApache POI\u5e93\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5305\u62ecJava\u8bfb\u53d6\u3001\u5199\u5165Excel\u6587\u4ef6\uff0c\u64cd\u4f5cWord\u6587\u6863\u548cPowerPoint\u6f14\u793a\u6587\u7a3f\u7684\u5b8c\u6574\u793a\u4f8b\u3002\u9002\u5408Java\u5f00\u53d1\u8005\u5b66\u4e60Office\u6587\u6863\u5904\u7406\u6280\u672f\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-\u6559\u7a0b\/","og_locale":"zh_CN","og_type":"article","og_title":"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357","og_description":"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecdApache POI\u5e93\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5305\u62ecJava\u8bfb\u53d6\u3001\u5199\u5165Excel\u6587\u4ef6\uff0c\u64cd\u4f5cWord\u6587\u6863\u548cPowerPoint\u6f14\u793a\u6587\u7a3f\u7684\u5b8c\u6574\u793a\u4f8b\u3002\u9002\u5408Java\u5f00\u53d1\u8005\u5b66\u4e60Office\u6587\u6863\u5904\u7406\u6280\u672f\u3002","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-\u6559\u7a0b\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-04-10T23:10:09+00:00","article_modified_time":"2025-08-02T20:09:31+00:00","author":"\u79d1, \u9896","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u9896","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/","name":"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-04-10T23:10:09+00:00","dateModified":"2025-08-02T20:09:31+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e"},"description":"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecdApache POI\u5e93\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5305\u62ecJava\u8bfb\u53d6\u3001\u5199\u5165Excel\u6587\u4ef6\uff0c\u64cd\u4f5cWord\u6587\u6863\u548cPowerPoint\u6f14\u793a\u6587\u7a3f\u7684\u5b8c\u6574\u793a\u4f8b\u3002\u9002\u5408Java\u5f00\u53d1\u8005\u5b66\u4e60Office\u6587\u6863\u5904\u7406\u6280\u672f\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"2023\u5e74Apache POI\u5b8c\u5168\u6559\u7a0b\uff1aJava\u64cd\u4f5cExcel\u3001Word\u548cPowerPoint\u7684\u7ec8\u6781\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e","name":"\u79d1, \u9896","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","caption":"\u79d1, \u9896"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-poi-%e6%95%99%e7%a8%8b\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=707"}],"version-history":[{"count":4,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/707\/revisions"}],"predecessor-version":[{"id":110535,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/707\/revisions\/110535"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}