{"id":41403,"date":"2023-09-27T03:05:11","date_gmt":"2023-09-26T19:05:11","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=41403"},"modified":"2023-09-27T03:05:11","modified_gmt":"2023-09-26T19:05:11","slug":"sypkfl","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/41403.html","title":{"rendered":"\u4f7f\u7528POI\u5f00\u53d1Linux"},"content":{"rendered":"

  POI\uff08Pluggable Object Infrastructure\uff09\u662f\u4e00\u79cd\u5f00\u6e90\u7684Java\u6846\u67b6\uff0c\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1\u57fa\u4e8eLinux\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u66f4\u5bb9\u6613\u5730\u4f7f\u7528Java\u8bed\u8a00\u5f00\u53d1\u529f\u80fd\u5f3a\u5927\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u53ca\u66f4\u5bb9\u6613\u5730\u7ba1\u7406\u548c\u7ef4\u62a4\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u3002\u672c\u6587\u5c06\u4ecb\u7ecdPOI\u7684\u4e3b\u8981\u7279\u6027\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528POI\u5f00\u53d1\u5728Linux\u4e0a\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

POI\u7684\u4e3b\u8981\u7279\u6027<\/h2>\n

  POI\u662f\u4e00\u79cd\u5f3a\u5927\u7684Java\u6846\u67b6\uff0c\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1\u57fa\u4e8eLinux\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u7684\u4e3b\u8981\u7279\u6027\u5305\u62ec\uff1a<\/p>\n

  \u652f\u6301\u591a\u79cd\u6587\u4ef6\u683c\u5f0f<\/h3>\n

  POI\u652f\u6301\u591a\u79cd\u6587\u4ef6\u683c\u5f0f\uff0c\u5305\u62ecWord\u6587\u6863\u3001Excel\u8868\u683c\u3001PowerPoint\u6f14\u793a\u6587\u7a3f\u4ee5\u53caPDF\u6587\u4ef6\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528POI\u5f00\u53d1\u7a0b\u5e8f\uff0c\u4ee5\u4fbf\u5728Linux\u7cfb\u7edf\u4e2d\u67e5\u770b\u3001\u7f16\u8f91\u548c\u4fdd\u5b58\u8fd9\u4e9b\u6587\u4ef6\u3002<\/p>\n

  \u652f\u6301\u591a\u79cd\u6570\u636e\u5e93<\/h3>\n

  POI\u652f\u6301\u591a\u79cd\u6570\u636e\u5e93\uff0c\u5305\u62ecMySQL\u3001Oracle\u3001SQL Server\u7b49\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528POI\u6765\u8bbf\u95ee\u8fd9\u4e9b\u6570\u636e\u5e93\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u9ad8\u6548\u7684\u6570\u636e\u5e93\u7ba1\u7406\u3002<\/p>\n

  \u652f\u6301\u591a\u79cd\u7f51\u7edc\u534f\u8bae<\/h3>\n

  POI\u652f\u6301\u591a\u79cd\u7f51\u7edc\u534f\u8bae\uff0c\u5305\u62ecHTTP\u3001FTP\u3001SMTP\u7b49\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528POI\u6765\u8bbf\u95ee\u8fd9\u4e9b\u7f51\u7edc\u534f\u8bae\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u9ad8\u6548\u7684\u7f51\u7edc\u7ba1\u7406\u3002<\/p>\n

  \u652f\u6301\u591a\u79cd\u5b89\u5168\u534f\u8bae<\/h3>\n

  POI\u652f\u6301\u591a\u79cd\u5b89\u5168\u534f\u8bae\uff0c\u5305\u62ecSSL\u3001TLS\u7b49\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528POI\u6765\u4fdd\u62a4\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\uff0c\u4ece\u800c\u4fdd\u62a4\u5e94\u7528\u7a0b\u5e8f\u548c\u7528\u6237\u7684\u6570\u636e\u5b89\u5168\u3002<\/p>\n

\u5982\u4f55\u4f7f\u7528POI\u5f00\u53d1Linux\u5e94\u7528\u7a0b\u5e8f<\/h2>\n

  POI\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1\u57fa\u4e8eLinux\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u4e0b\u9762\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528POI\u5f00\u53d1Linux\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n

  \u5b89\u88c5POI<\/h3>\n

  \u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5POI\uff0c\u4ee5\u4fbf\u5728Linux\u7cfb\u7edf\u4e2d\u4f7f\u7528\u5b83\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5POI\uff1a<\/p>\n

sudo apt-get install poi<\/code><\/pre>\n

  \u7f16\u5199\u4ee3\u7801<\/h3>\n

  \u63a5\u4e0b\u6765\uff0c\u9700\u8981\u4f7f\u7528POI\u7f16\u5199\u4ee3\u7801\uff0c\u4ee5\u5b9e\u73b0\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\u3002POI\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684API\uff0c\u53ef\u4ee5\u7528\u4e8e\u5b9e\u73b0\u5404\u79cd\u529f\u80fd\u3002<\/p>\n

  \u7f16\u8bd1\u4ee3\u7801<\/h3>\n

  \u6700\u540e\uff0c\u9700\u8981\u4f7f\u7528POI\u7f16\u8bd1\u4ee3\u7801\uff0c\u4ee5\u751f\u6210\u53ef\u6267\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u7f16\u8bd1\u4ee3\u7801\uff1a<\/p>\n

poi compile myprogram.java<\/code><\/pre>\n

\u603b\u7ed3<\/h2>\n

  \u672c\u6587\u4ecb\u7ecd\u4e86POI\u7684\u4e3b\u8981\u7279\u6027\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528POI\u5f00\u53d1\u5728Linux\u4e0a\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/strong>POI\u662f\u4e00\u79cd\u5f3a\u5927\u7684Java\u6846\u67b6\uff0c\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1\u57fa\u4e8eLinux\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u652f\u6301\u591a\u79cd\u6587\u4ef6\u683c\u5f0f\u3001\u591a\u79cd\u6570\u636e\u5e93\u3001\u591a\u79cd\u7f51\u7edc\u534f\u8bae\u548c\u591a\u79cd\u5b89\u5168\u534f\u8bae\uff0c\u53ef\u4ee5\u6781\u5927\u5730\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u6548\u7387\u548c\u7ba1\u7406\u6548\u7387\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

POI\uff08PluggableObjectInfrastructure\uff09\u662f\u4e00\u79cd\u5f00\u6e90\u7684Java\u6846\u67b6\uff0c\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1\u57fa\u4e8eLinux\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u66f4\u5bb9\u6613\u5730\u4f7f\u7528Java<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-41403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=41403"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=41403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=41403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=41403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}