{"id":6894,"date":"2016-04-15T14:51:21","date_gmt":"2016-04-15T05:51:21","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=6894"},"modified":"2016-09-12T00:09:34","modified_gmt":"2016-09-11T15:09:34","slug":"closedxml%e3%82%84epplus%e3%81%a7excel%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e8%aa%ad%e3%81%bf%e6%9b%b8%e3%81%8d%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=6894","title":{"rendered":"ClosedXML\u3084EPPlus\u3067Excel\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u66f8\u304d\u3057\u3066\u307f\u305f\u3002"},"content":{"rendered":"<p>\u4eca\u56de\u306e\u8a18\u4e8b\u306e\u767a\u7aef\u306f\u4e0b\u8a18\u306eQiita\u6295\u7a3f\u3002<\/p>\n<p><strong>\u30fbExcel\u30d5\u30a1\u30a4\u30eb\u3092 C# \u3068 VB.NET \u3067\u8aad\u307f\u8fbc\u3080 &#8220;\u6b63\u3057\u3044&#8221; \u65b9\u6cd5 &#8211; Qiita<\/strong><br \/>\n<a href=\"http:\/\/qiita.com\/midori44\/items\/acab9106e6dad9653e73\" title=\"Excel\u30d5\u30a1\u30a4\u30eb\u3092 C# \u3068 VB.NET \u3067\u8aad\u307f\u8fbc\u3080 \"\u6b63\u3057\u3044\" \u65b9\u6cd5 - Qiita\" target=\"_blank\">http:\/\/qiita.com\/midori44\/items\/acab9106e6dad9653e73<\/a><\/p>\n<p>.NET\u304b\u3089Excel\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3046 \u2192 Interop \u2192 \u30d7\u30ed\u30bb\u30b9\u304c\u6b8b\u308a\u7d9a\u3051\u308b\u3001\u3053\u308c\u3092\u7d4c\u9a13\u3057\u305f\u4eba\u306f\u7d50\u69cb\u591a\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306eInterop\u554f\u984c\u306b\u5bfe\u3057\u3066\u3001\u4e0a\u8a18\u6295\u7a3f\u3067\u306f<a href=\"https:\/\/closedxml.codeplex.com\/\" title=\"ClosedXML - The easy way to OpenXML - Home\" target=\"_blank\">ClosedXML<\/a>\u3084<a href=\"https:\/\/npoi.codeplex.com\/\" title=\"NPOI - Home\" target=\"_blank\">NPOI<\/a>\u3068\u3044\u3063\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5229\u7528\u3092\u85a6\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3057\u304b\u306bExcel\u3092\u5229\u7528\u3057\u306a\u3044\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308c\u3070\u3001Excel\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0d\u8981\u3060\u3057\u3001\u51e6\u7406\u901f\u5ea6\u3082\u65e9\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u4eca\u56de\u306f<a href=\"https:\/\/closedxml.codeplex.com\/\" title=\"ClosedXML - The easy way to OpenXML - Home\" target=\"_blank\">ClosedXML<\/a>\u3068<a href=\"http:\/\/epplus.codeplex.com\/\" title=\"EPPlus-Create advanced Excel spreadsheets on the server - Home\" target=\"_blank\">EPPlus<\/a>\u3092\u4f7f\u3063\u3066Excel\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u66f8\u304d\u3092\u884c\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<h4 class=\"style4a\">ClosedXML\u306b\u3088\u308bExcel\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c<\/h4>\n<p>\u307e\u305a\u306f\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u304c\u3001<a href=\"https:\/\/closedxml.codeplex.com\/\" title=\"ClosedXML - The easy way to OpenXML - Home\" target=\"_blank\">CodePlex<\/a>\u306b\u3082\u30d5\u30a1\u30a4\u30eb\u306f\u3042\u308a\u307e\u3059\u304c\u3001<a href=\"https:\/\/www.nuget.org\/packages\/ClosedXML\/\" title=\"NuGet Gallery | ClosedXML 0.76.0\" target=\"_blank\">NuGet<\/a>\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3057\u305f\u65b9\u304c\u304a\u624b\u8efd\u3067\u3059\u3002<br \/>\n(<a href=\"https:\/\/www.nuget.org\/packages\/DocumentFormat.OpenXml\/\" title=\"NuGet Gallery | DocumentFormat.OpenXml 2.5.0\" target=\"_blank\">DocumentFormat.OpenXml<\/a>\u3082\u5fc5\u8981\u306a\u306e\u3067\u5fd8\u308c\u305a\u306b\u53d6\u5f97)<\/p>\n<p>\u300c<span style=\"color: #ff0000; font-weight: bold;\">ClosedXML.dll<\/span>\u300d\u3068\u300c<span style=\"color: #ff0000; font-weight: bold;\">DocumentFormat.OpenXml.dll<\/span>\u300d\u30d5\u30a1\u30a4\u30eb\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u3089\u3001\u3042\u3068\u306f\u305d\u308c\u3089\u3092\u53c2\u7167\u3057\u3066\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">using System;\r\nusing ClosedXML.Excel;\r\n\r\nnamespace ClosedXMLSample\r\n{\r\n  class Program\r\n  {\r\n    public static void Main(string&#x5B;] args)\r\n    {\r\n      using (var book = new XLWorkbook(@&quot;C:\\Test\\Sample.xlsx&quot;, XLEventTracking.Disabled)) {\r\n        var sheet = book.Worksheet(1);\r\n        var address = sheet.RangeUsed().RangeAddress.LastAddress;\r\n        \/\/\u30bb\u30eb\u5185\u5bb9\u5217\u6319\r\n        for (int i = 1; i &lt;= address.RowNumber; i++) {\r\n          for (int j = 1; j &lt;= address.ColumnNumber; j++) {\r\n            Console.WriteLine(&quot;Address:{0}, Value:{1}&quot;, sheet.Cell(i, j).Address, sheet.Cell(i, j).Value);\r\n          }\r\n        }\r\n        \/\/\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3093\u3067\u5225\u540d\u4fdd\u5b58\r\n        sheet.Range(&quot;C1&quot;).Value = &quot;\u6f22\u5b57\u30c6\u30b9\u30c8&quot;;\r\n        sheet.Cell(2, 3).Value = &quot;abcde&quot;;\r\n        book.SaveAs(@&quot;C:\\Test\\Sample2.xlsx&quot;);\r\n      }\r\n      Console.WriteLine(&quot;-- \u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f --&quot;);\r\n      Console.ReadKey(true);\r\n    }\r\n  }\r\n}<\/pre>\n<p>\u300cSample.xlsx\u300d\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u30fb\u66f8\u304d\u8fbc\u307f\u3092\u3057\u305f\u5f8c\u306b\u5225\u540d\u4fdd\u5b58\u3059\u308b\u3060\u3051\u306e\u7c21\u5358\u306a\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u3092\u898b\u308c\u3070\u5206\u304b\u308b\u901a\u308a\u3001VBA\u306e\u30b3\u30fc\u30c9\u306b\u96f0\u56f2\u6c17\u304c\u4f3c\u3066\u3044\u308b\u306e\u3067\u3001VBA\u306b\u6163\u308c\u3066\u3044\u308b\u65b9\u306f\u3059\u3093\u306a\u308a\u30b3\u30fc\u30c9\u3092\u66f8\u3051\u305d\u3046\u3067\u3059\u3002<\/p>\n<h4 class=\"style4a\">EPPlus\u306b\u3088\u308bExcel\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c<\/h4>\n<p>\u4eca\u5ea6\u306f<a href=\"http:\/\/epplus.codeplex.com\/\" title=\"EPPlus-Create advanced Excel spreadsheets on the server - Home\" target=\"_blank\">EPPlus<\/a>\u3092\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<br \/>\n\u3053\u3061\u3089\u3082<a href=\"https:\/\/www.nuget.org\/packages\/EPPlus\/\" title=\"NuGet Gallery | EPPlus 4.0.5\" target=\"_blank\">NuGet<\/a>\u304b\u3089\u53d6\u5f97\u3057\u305f\u65b9\u304c\u697d\u3067\u3059(EPPlus.dll)\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">using System;\r\nusing System.IO;\r\nusing OfficeOpenXml;\r\n\r\nnamespace EPPlusSample\r\n{\r\n  class Program\r\n  {\r\n    public static void Main(string&#x5B;] args)\r\n    {\r\n      using (var excel = new ExcelPackage(new FileInfo(@&quot;C:\\Test\\Sample.xlsx&quot;))) {\r\n        var sheet = excel.Workbook.Worksheets&#x5B;1];\r\n        var address = sheet.Dimension;\r\n        \/\/\u30bb\u30eb\u5185\u5bb9\u5217\u6319\r\n        for (int i = address.Start.Row; i &lt;= address.End.Row; i++) {\r\n          for (int j = address.Start.Column; j &lt;= address.End.Column; j++) {\r\n            Console.WriteLine(&quot;Address:{0}, Value:{1}&quot;, sheet.Cells&#x5B;i, j].Address, sheet.Cells&#x5B;i, j].Value);\r\n          }\r\n        }\r\n        \/\/\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3093\u3067\u5225\u540d\u4fdd\u5b58\r\n        sheet.Cells&#x5B;&quot;C1&quot;].Value = &quot;\u6f22\u5b57\u30c6\u30b9\u30c8&quot;;\r\n        sheet.Cells&#x5B;2, 3].Value = &quot;bbbbb&quot;;\r\n        excel.SaveAs(new FileInfo(@&quot;C:\\Test\\Sample3.xlsx&quot;));\r\n      }\r\n      Console.WriteLine(&quot;-- \u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f --&quot;);\r\n      Console.ReadKey(true);\r\n    }\r\n  }\r\n}<\/pre>\n<p>ClosedXML\u306e\u52d5\u4f5c\u78ba\u8a8d\u3067\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u3068\u307b\u307c\u540c\u3058\u51e6\u7406\u5185\u5bb9\u3067\u3059\u304c\u3001\u30b3\u30fc\u30c9\u306e\u66f8\u304d\u65b9\u306f\u82e5\u5e72\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>ClosedXML\u306e\u65b9\u304cVBA\u3063\u307d\u304f\u3066\u500b\u4eba\u7684\u306b\u306f\u66f8\u304d\u3084\u3059\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u300c<a href=\"http:\/\/devlights.hatenablog.com\/entry\/2015\/04\/02\/062545\" title=\"EPPlus\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u30e1\u30e2 (xlsx\u5f62\u5f0f, Excel\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5fc5\u8981\u306a\u3044, COM\u4f7f\u308f\u306a\u3044) - \u3044\u308d\u3044\u308d\u5099\u5fd8\u9332\u65e5\u8a18\" target=\"_blank\">EPPlus\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u30e1\u30e2 (xlsx\u5f62\u5f0f, Excel\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5fc5\u8981\u306a\u3044, COM\u4f7f\u308f\u306a\u3044)<\/a>\u300d\u3084\u300c<a href=\"http:\/\/zeeshanumardotnet.blogspot.jp\/2011\/06\/creating-reports-in-excel-2007-using.html\" title=\"Zeeshan Umar's Blog\" target=\"_blank\">Creating Reports in Excel 2007 using EPPlus<\/a>\u300d\u3092\u898b\u308b\u3068\u3001EPPlus\u306e\u65b9\u304c\u8272\u3005\u51e6\u7406\u3067\u304d\u305d\u3046\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<h4 class=\"style4a\">\u304a\u308f\u308a\u306b<\/h4>\n<p>\u4eca\u56de<a href=\"https:\/\/closedxml.codeplex.com\/\" title=\"ClosedXML - The easy way to OpenXML - Home\" target=\"_blank\">ClosedXML<\/a>\u3068<a href=\"http:\/\/epplus.codeplex.com\/\" title=\"EPPlus-Create advanced Excel spreadsheets on the server - Home\" target=\"_blank\">EPPlus<\/a>\u306e2\u3064\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u3069\u3061\u3089\u3082\u304a\u624b\u8efd\u3067\u7c21\u5358\u306bExcel\u30d5\u30a1\u30a4\u30eb\u3092\u64cd\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u304c\u66f8\u3051\u307e\u3057\u305f\u3002<br \/>\nExcel\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u6709\u7121\u3084COM\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u89e3\u653e\u3092\u6c17\u306b\u3057\u306a\u304f\u3066\u826f\u3044\u306e\u3067\u3001\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>Word\u3084PowerPoint\u7528\u306e\u4f3c\u305f\u3088\u3046\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u7121\u3044\u3082\u306e\u304b\u3068\u691c\u7d22\u3057\u3066\u307f\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u3061\u3089\u306f\u6709\u511f\u306e\u3082\u306e\u3057\u304b\u30d2\u30c3\u30c8\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\n\u4eca\u306e\u3068\u3053\u308d\u3001Word\u3084PowerPoint\u30d5\u30a1\u30a4\u30eb\u3092\u64cd\u4f5c\u3059\u308b\u306e\u306f\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=2246\" title=\"\u300cNetOffice\u300d\u3067\u7c21\u5358\u306b.NET\u304b\u3089Office\u3092\u64cd\u4f5c | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">NetOffice<\/a>\u300d\u304c\u304a\u624b\u8efd\u306a\u306e\u304b\u306a\uff1f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">\u95a2\u9023Web\u30da\u30fc\u30b8<\/h4>\n<ul>\n<li>OpenXML \u3092\u7c21\u5358\u306b\u3059\u308b ClosedXML<\/li>\n<li style=\"list-style-type:none;\"><a href=\"http:\/\/www.infoq.com\/jp\/news\/2011\/07\/ClosedXML\" target=\"_blank\" title=\"OpenXML \u3092\u7c21\u5358\u306b\u3059\u308b ClosedXML\">http:\/\/www.infoq.com\/jp\/news\/2011\/07\/ClosedXML<\/a><\/li>\n<li>NPOI\u3082EPPLUS\u3082ClosedXML\u3082\u306a\u3093\u304b\u3044\u307e\u3044\u3061\u3002<\/li>\n<li style=\"list-style-type:none;\"><a href=\"http:\/\/nnspaces.sblo.jp\/article\/88907504.html\" target=\"_blank\" title=\"NPOI\u3082EPPLUS\u3082ClosedXML\u3082\u306a\u3093\u304b\u3044\u307e\u3044\u3061\u3002\">http:\/\/nnspaces.sblo.jp\/article\/88907504.html<\/a><\/li>\n<li>COM \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5b9f\u88c5\u306e\u9053\u7a0b for TaskScheduler \u305d\u306e\u756a\u5916\u7de82 \uff5e COM \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068 GC \u3068\u30d5\u30a1\u30a4\u30ca\u30e9\u30a4\u30b6<\/li>\n<li style=\"list-style-type:none;\"><a href=\"http:\/\/hongliang.seesaa.net\/article\/14551716.html\" target=\"_blank\" title=\"COM \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5b9f\u88c5\u306e\u9053\u7a0b for TaskScheduler \u305d\u306e\u756a\u5916\u7de82 \uff5e COM \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068 GC \u3068\u30d5\u30a1\u30a4\u30ca\u30e9\u30a4\u30b6\">http:\/\/hongliang.seesaa.net\/article\/14551716.html<\/a><\/li>\n<\/ul>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"\u4eca\u56de\u306e\u8a18\u4e8b\u306e\u767a\u7aef\u306f\u4e0b\u8a18\u306eQiita\u6295\u7a3f\u3002 \u30fbExcel\u30d5\u30a1\u30a4\u30eb\u3092 C# \u3068 VB.NET \u3067\u8aad\u307f\u8fbc\u3080 &#8220;\u6b63\u3057\u3044&#8221; \u65b9\u6cd5 &#8211; Qiita http:\/\/qiita.com\/midori4 [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[ClosedXML\u3084EPPlus\u3067Excel\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u66f8\u304d\u3057\u3066\u307f\u305f]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,48],"tags":[],"class_list":["post-6894","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-1Nc","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6894"}],"version-history":[{"count":3,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6894\/revisions"}],"predecessor-version":[{"id":7340,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6894\/revisions\/7340"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}