{"id":11916,"date":"2026-01-05T14:40:19","date_gmt":"2026-01-05T05:40:19","guid":{"rendered":"https:\/\/www.moonmile.net\/blog\/?p=11916"},"modified":"2026-01-06T11:28:13","modified_gmt":"2026-01-06T02:28:13","slug":"excel-like-uno-%e3%82%92%e4%bb%ae%e3%83%aa%e3%83%aa%e3%83%bc%e3%82%b9","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/11916","title":{"rendered":"LibreOffice Calc \u3067\u4f7f\u3046 Excel Like UNO \u3092\u4eee\u30ea\u30ea\u30fc\u30b9"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6b63\u6708\u306b\u3061\u307e\u3061\u307e\u6574\u5099\u3057\u3066\u3044\u305f Excel Like Uno \u304c\u3001\u307e\u3042\u52d5\u304f\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u4eee\u30ea\u30ea\u30fc\u30b9\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/moonmile\/ExcelLikeUno\">https:\/\/github.com\/moonmile\/ExcelLikeUno<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-bluesky-social wp-block-embed-bluesky-social\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"bluesky-embed\" data-bluesky-uri=\"at:\/\/did:plc:6yrvngljisjcx6llftjkvofw\/app.bsky.feed.post\/3mbnhbstpqc2a\" data-bluesky-cid=\"bafyreiev6wg3cxegvtnd3pa5m3dmidajdiz4g4aggtkvqez6c7atpbrwrm\"><p lang=\"ja\">moonmile\/ExcelLikeUno: LibreOffice \u306e Python \u30de\u30af\u30ed\u3092 Excel VBA \u30e9\u30a4\u30af\u306b\u64cd\u4f5c github.com\/moonmile\/Exc&#8230;\u4e00\u65e6\u3001\u4eee\u30ea\u30ea\u30fc\u30b9\u3002<\/p>&mdash; <a href=\"https:\/\/bsky.app\/profile\/did:plc:6yrvngljisjcx6llftjkvofw?ref_src=embed\">Tomoaki Masuda (@moonmile.bsky.social)<\/a> <a href=\"https:\/\/bsky.app\/profile\/did:plc:6yrvngljisjcx6llftjkvofw\/post\/3mbnhbstpqc2a?ref_src=embed\">2026-01-05T03:04:00.398Z<\/a><\/blockquote><script async src=\"https:\/\/embed.bsky.app\/static\/embed.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">12\u6708\u306b LibreOffice Calce \u306e Python \u30de\u30af\u30ed\u3092\u4f7f\u3063\u3066\u3001\u8af8\u3005\u3092\u8a66\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u73fe\u72b6\u306e uno api \u3060\u3051\u3067\u306f\u9650\u754c\u304c\u3042\u308a\u305d\u3046\u306a\u306e\u3067\u3001\u66f4\u306b\u30e9\u30c3\u30d7\u3092\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f5c\u3063\u3066\u8a66\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u76ee\u7684\u3068\u3057\u3066\u306f\u3001<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>UNO API \u306e\u8907\u96d1\u3055\u3092\u96a0\u853d\u3057\u3001Excel\/VBA \u306b\u8fd1\u3044\u30e1\u30bd\u30c3\u30c9\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3067\u3059\u308b<\/li>\n\n\n\n<li>\u578b\u5b9a\u7fa9\u3092\u5145\u5b9f\u3055\u305b\u3001IDE \u88dc\u5b8c\u3068\u9759\u7684\u89e3\u6790\u3092\u30b5\u30dd\u30fc\u30c8<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u306a\u3068\u3053\u308d\u3067\u3001\u5f93\u6765\u306e Excel VBA \u306b\u4f3c\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u306f LibreOffice Calc \u3067\u3082 Option VBASupport 1 \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u308b\u3068 VBA \u4e92\u63db\u30e2\u30fc\u30c9\u3067\u52d5\u304b\u305b\u307e\u3059\u3002\u304b\u306a\u308a Excel VBA \u306b\u8fd1\u3044\u3068\u3053\u308d\u307e\u3067\u30a8\u30df\u30e5\u30ec\u30fc\u30c8\u3059\u308b\u306e\u3067 Excel VBA \u304b\u3089\u79fb\u884c\u3059\u308b\u5834\u5408\u306f\u3053\u3063\u3061\u306e\u307b\u3046\u304c\u697d\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br>\u305f\u3060\u3001\u3044\u307e\u3055\u3089 VBA \u3067\u3084\u308a\u305f\u304f\u306a\u3044\u3057\u3001\u3069\u3046\u305b\u306a\u3089\u3070 Python \u304b\u4f55\u304b\u5225\u306e\u8a00\u8a9e\u3067\u3084\u308a\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30f3\u30d7\u30eb calc_sample_cell.py<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom excellikeuno import connect_calc\nfrom excellikeuno.typing.calc import CellHoriJustify, CellVertJustify\n\n(desktop, doc, sheet) = connect_calc() \ncell = sheet.cell(0, 0)  # A1 \u30bb\u30eb\u3092\u53d6\u5f97\ncell.text = &quot;Hello, World!&quot;  # \u5024\u3092\u8a2d\u5b9a\nsheet.range(&quot;A1:C1&quot;).merge(True)  # A1:C1 \u3092\u7d50\u5408\n\ncell.font_size = 16\ncell.font_name = &quot;Arial&quot;\ncell.font_color = 0xFF0000  # \u30d5\u30a9\u30f3\u30c8\u8272\u3092\u8d64\u306b\n\ncell.row_height = 2000  # \u884c\u306e\u9ad8\u3055\u3092\u8a2d\u5b9a 20 mm\ncell.HoriJustify = CellHoriJustify.CENTER\ncell.VertJustify = CellVertJustify.CENTER\n\n\nsheet.cell(0,1).text = &quot;id&quot;\nsheet.cell(1,1).text = &quot;name&quot;\nsheet.cell(2,1).text = &quot;address&quot;\nsheet.range(&quot;A2:C2&quot;).CellBackColor = 0xFFBF00  # A2:C2 \u306e\u80cc\u666f\u8272\u3092\u8a2d\u5b9a\n\ndata = &#x5B;\n    &#x5B;1, &quot;masuda&quot;, &quot;tokyo&quot;],\n    &#x5B;2, &quot;suzuki&quot;, &quot;osaka&quot;],\n    &#x5B;3, &quot;takahashi&quot;, &quot;nagoya&quot;],\n]\nsheet.range(&quot;A3:C5&quot;).value = data  # \u7bc4\u56f2\u306b\u30c7\u30fc\u30bf\u3092\u4e00\u62ec\u8a2d\u5b9a\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3093\u306a\u611f\u3058\u3067\u3001\u6700\u521d\u306b connect_calc() \u3067\u63a5\u7d9a\u3057\u3066\u304b\u3089\u3001<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>sheet.cell( column, row ) \u3067\u30bb\u30eb\u3092\u53d6\u5f97<\/li>\n\n\n\n<li>cell.font_size \u306a\u3069\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3046<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u3068\u3044\u3044\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30c6\u30ad\u30b9\u30c8\u3084\u5024\u306f\u3001getText() \u3084 setText() \u3092\u4f7f\u3046\u306e\u3067\u306f\u306a\u304f\u3001text \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3044\u307e\u3059\u3002\u5b9f\u969b\u306b\u306f\u3001\u6570\u5024\u306f value \u30d7\u30ed\u30d1\u30c6\u30a3\u3001\u30c6\u30ad\u30b9\u30c8\u304c text \u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3057\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"655\" src=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image.png\" alt=\"\" class=\"wp-image-11917\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image.png 865w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-300x227.png 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-768x582.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e Python \u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001LibreOffice Calc \u3060\u3068\u3001\u3053\u3093\u306a\u8868\u793a\u306b\u306a\u308a\u307e\u3059\u3002<br>\u307e\u3042\u3001\u4e00\u822c\u7684\u306a\u8868\u3050\u3089\u3044\u306f\u3067\u304d\u305d\u3046\u306a\u72b6\u614b\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30f3\u30d7\u30eb calc_sample_shogiban.py<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f6b\u7dda\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# \u5c06\u68cb\u76e4\u3092\u4f5c\u308b\nfrom excellikeuno import connect_calc\nfrom excellikeuno.typing.calc import CellHoriJustify, CellVertJustify\nfrom excellikeuno.typing.structs import BorderLine\n\n(desktop, doc, sheet) = connect_calc()\n# sheet.name = &quot;\u5c06\u68cb\u76e4&quot;\nban = sheet.range(&quot;A1:I9&quot;);\nban.CellBackColor = 0xFFFACD  # \u80cc\u666f\u8272\u3092\u8584\u3044\u9ec4\u8272\u306b\u8a2d\u5b9a\nban.row_height = 1000  # \u884c\u306e\u9ad8\u3055\u3092\u8a2d\u5b9a 20 mm\nban.column_width = 1000  # \u5217\u306e\u5e45\u3092\u8a2d\u5b9a 20 mm\n# \u7f6b\u7dda\u3092\u8a2d\u5b9a\nfor cell in &#x5B;c for row in ban.cells for c in row]:\n    borderline = BorderLine()\n    borderline.Color = 0x000000\n    borderline.OuterLineWidth = 50\n    borderline.InnerLineWidth = 0\n    borderline.LineDistance = 0\n\n    cell.TopBorder = borderline\n    cell.BottomBorder = borderline\n    cell.LeftBorder = borderline\n    cell.RightBorder = borderline\n    # \u30bb\u30f3\u30bf\u30ea\u30f3\u30b0\n    cell.HoriJustify = CellHoriJustify.CENTER\n    cell.VertJustify = CellVertJustify.CENTER\n    # \u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u3092\u5927\u304d\u304f\n    cell.font_size = 16.0\n    cell.CharColor = 0x000000  # \u9ed2\u8272\u306b\u8a2d\u5b9a\n    \n\n# \u99d2\u3092\u914d\u7f6e\npieces = &#x5B;\n    &#x5B;&quot;\u9999&quot;, &quot;\u6842&quot;, &quot;\u9280&quot;, &quot;\u91d1&quot;, &quot;\u738b&quot;, &quot;\u91d1&quot;, &quot;\u9280&quot;, &quot;\u6842&quot;, &quot;\u9999&quot;],\n    &#x5B;&quot;&quot;, &quot;\u98db&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;\u89d2&quot;, &quot;&quot;],\n    &#x5B;&quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;, &quot;\u6b69&quot;],\n    &#x5B;&quot;&quot;, &quot;\u89d2&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;\u98db&quot;, &quot;&quot;],\n    &#x5B;&quot;\u9999&quot;, &quot;\u6842&quot;, &quot;\u9280&quot;, &quot;\u91d1&quot;, &quot;\u738b&quot;, &quot;\u91d1&quot;, &quot;\u9280&quot;, &quot;\u6842&quot;, &quot;\u9999&quot;],\n]\nban.value = pieces  # \u4e00\u62ec\u3067\u99d2\u3092\u914d\u7f6e\n# \u76f8\u624b\u306e\u99d2\u3092\u53cd\u8ee2\u8868\u793a\nfor r in range(9):\n    for c in range(9):\n        cell = ban.cell(c, r)\n        if pieces&#x5B;r]&#x5B;c] != &quot;&quot; and r &lt; 3:\n            cell.CharRotation = 180  # 180\u5ea6\u56de\u8ee2\n\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"655\" src=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-1.png\" alt=\"\" class=\"wp-image-11918\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-1.png 865w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-1-300x227.png 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-1-768x582.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30bb\u30eb\u306e\u5927\u304d\u3055\u3092\u5909\u3048\u3066\uff08\u3044\u308f\u3086\u308b\u5c06\u68cb\u76e4\u306b\u3057\u307e\u3059\uff09\u3001\u99d2\u3092\u30bb\u30eb\u306b\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<br>\u7f6b\u7dda\u3092\u3064\u3051\u308b\u3068\u3053\u308d\u3068\u3001\u6587\u5b57\u304c180\u5ea6\u56de\u8ee2\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u3042\u3001\u3053\u308c\u3092 Excel \u3067\u3084\u308b\u304b\u3069\u3046\u304b\u306f\u5225\u3067\u3059\u304c\u3001Excel \u65b9\u773c\u7d19\u3050\u3089\u3044\u306a\u3089\u3070\u4f5c\u308c\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30f3\u30d7\u30eb calc_sample_tsurukame.py<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u306f\u56f3\u5f62\u3092\u914d\u7f6e\u3059\u308b\u4f8b\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# \u9db4\u4e80\u30aa\u30bb\u30ed\u306e\u30b5\u30f3\u30d7\u30eb\nfrom excellikeuno import connect_calc\nfrom excellikeuno.typing.structs import BorderLine\n\n(desktop, doc, sheet) = connect_calc()\n# sheet.name = &quot;\u9db4\u4e80\u30aa\u30bb\u30ed&quot;\nban = sheet.range(&quot;A1:H8&quot;);\nban.CellBackColor = 0x006400  # \u80cc\u666f\u8272\u3092\u6fc3\u3044\u7dd1\u8272\u306b\nban.row_height = 1000  # \u884c\u306e\u9ad8\u3055\u3092\u8a2d\u5b9a 10 mm\nban.column_width = 1000  # \u5217\u306e\u5e45\u3092\u8a2d\u5b9a 10 mm\n# \u7f6b\u7dda\u3092\u8a2d\u5b9a\nfor cell in &#x5B;c for row in ban.cells for c in row]:\n    borderline = BorderLine()\n    borderline.Color = 0x000000\n    borderline.OuterLineWidth = 50\n    borderline.InnerLineWidth = 0\n    borderline.LineDistance = 0\n    cell.TopBorder = cell.BottomBorder = cell.LeftBorder = cell.RightBorder = borderline\n\n# \u30aa\u30bb\u30ed\u306e\u99d2\u3092 Shape \u3067\u914d\u7f6e\npieces = &#x5B;\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;\u9ed2&quot;, &quot;\u767d&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;\u767d&quot;, &quot;\u9ed2&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n    &#x5B;&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],\n]\n\nfor r in range(8):\n    for c in range(8):\n        cell = ban.cell(c, r)\n        piece = pieces&#x5B;r]&#x5B;c]\n        if piece == &quot;&quot;:\n            continue\n        sheet.shapes.add_ellipse_shape(\n            x=cell.position.X + 200,\n            y=cell.position.Y + 200,\n            width=600,\n            height=600,\n            fill_color=0x000000 if piece == &quot;\u9ed2&quot; else 0xFFFFFF,\n            line_color=0x000000,\n        )\n\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"655\" src=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-2.png\" alt=\"\" class=\"wp-image-11919\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-2.png 865w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-2-300x227.png 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-2-768x582.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30bb\u30eb\u306b\u7f6b\u7dda\u3068\u80cc\u666f\u8272\u3092\u3064\u3051\u3066\u3001\u30aa\u30bb\u30ed\u306e\u99d2\u306f EllipseShape\uff08\u6955\u5186\uff09\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30f3\u30d7\u30eb calc_sample_mahjong.py<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30f3\u30c8\u6307\u5b9a\u3068 TextShape \u3092\u4f7f\u3063\u305f\u4f8b\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# \u9ebb\u96c0\u724c\u3092\u4e26\u3079\u308b\nfrom excellikeuno import connect_calc\nfrom excellikeuno.typing.calc import LineStyle\n\n(desktop, doc, sheet) = connect_calc()\n# sheet.name = &quot;\u9ebb\u96c0\u724c&quot;\n\nhai = &#x5B;&#039;1&#039;,&#039;1&#039;,&#039;1&#039;, &#039;2&#039;,&#039;2&#039;,&#039;2&#039;, &#039;3&#039;,&#039;3&#039;,&#039;3&#039;, &#039;4&#039;,&#039;4&#039;,&#039;4&#039;, &#039;a&#039;,&#039; &#039;,&#039;a&#039;]\n\n# 13\u500b\u306e TextShape \u3092\u30b7\u30fc\u30c8\u306b\u8ffd\u52a0\nfor i in range(hai.__len__()):\n    shape = sheet.shapes.add_text_shape(\n        x=i * 1600,\n        y=1000,\n        width=1500,\n        height=2000,\n        text=str(hai&#x5B;i]),\n        fill_color=0xFFFFE0  # \u8584\u3044\u9ec4\u8272\n    )\n    # \u80cc\u666f\u8272\u3092\u8a2d\u5b9a\n    shape.FillColor = 0xFFFFE0  # \u8584\u3044\u9ec4\u8272\n    # \u67a0\u7dda\u306e\u8272\u3092\u8a2d\u5b9a\n    shape.LineStyle = LineStyle.SOLID  # SOLID\n    shape.LineWidth = 50  # \u7dda\u306e\u592a\u3055\u309250 (1\/100 mm)\n    shape.LineColor = 0x008000  # \u7dd1\n    # \u30c6\u30ad\u30b9\u30c8\u3092\u4e2d\u592e\u63c3\u3048\n    shape.HoriJustify = 1  # CENTER\n    shape.VertJustify = 1  # CENTER\n    # \u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u3092\u5927\u304d\u304f\n    shape.font_size = 48.0\n    # \u30d5\u30a9\u30f3\u30c8\u306e\u6307\u5b9a\n    shape.CharFontName = &quot;GL-MahjongTile&quot;\n\n# \u9ebb\u96c0\u724c\u3092\u4e26\u3079\u308b\nfor i, shape in enumerate(sheet.shapes):\n    shape.PositionX = i * 1600  # X\u4f4d\u7f6e\u3092\u305a\u3089\u3059\n    shape.PositionY = 1000  # Y\u4f4d\u7f6e\u309210 mm\u306b\u8a2d\u5b9a\n\n# \u5b8c\u6210\n\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" src=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-3-1024x608.png\" alt=\"\" class=\"wp-image-11920\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-3-1024x608.png 1024w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-3-300x178.png 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-3-768x456.png 768w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-3.png 1103w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u9ebb\u96c0\u7528\u306e\u30d5\u30a9\u30f3\u30c8 &#8220;GL-MahjongTile&#8221; \u3092\u4f7f\u3063\u3066 TextShape \u3092\u4f7f\u3063\u305f\u4f8b\u3067\u3059\u3002<br>\u30d5\u30a9\u30f3\u30c8\u81ea\u4f53\u306f PC \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3044\u3068\u99c4\u76ee\u306a\u306e\u3067\u3001\u57cb\u3081\u8fbc\u307f\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56f3\u5f62\u304c\u8cbc\u308a\u4ed8\u3051\u3089\u308c\u308b\u3068\u3001\u30d5\u30ed\u30fc\u30c1\u30e3\u30fc\u30c8\u3068\u304b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u56f3\u3068\u304b\u306e\u751f\u6210\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Calc \u5185\u90e8\u304b\u3089\u30de\u30af\u30ed\u3067\u547c\u3073\u51fa\u3059<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3044\u307e\u307e\u3067\u306e\u4f8b\u306f\u5916\u90e8\u304b\u3089 Python \u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u547c\u3073\u51fa\u3059\u306e\u3067\u3059\u304c\u3001Calc \u5185\u90e8\u304b\u3089 Python \u30b3\u30fc\u30c9\u3092\u547c\u3073\u51fa\u3059\u306b\u306f\u3001XSCRIPTCONTEXT \u3092\u4f7f\u308f\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u3061\u3087\u3063\u3068\u521d\u671f\u5316\u30b3\u30fc\u30c9\u304c\u5916\u90e8\u547c\u51fa\u3057\u304b\u3089\u3068\u306f\u7570\u306a\u308b\u306e\u304c\u3084\u3084\u3053\u3057\u3044\u306e\u3067\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u3051\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport inspect\nimport os\nimport sys\nfrom typing import Any, Tuple\n\n# Ensure this script&#039;s directory is importable so the local excellike package resolves\nBASE_DIR = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\nif BASE_DIR not in sys.path:\n    sys.path.append(BASE_DIR)\n\nfrom excellikeuno.table.sheet import Sheet \n\n# XSCRIPTCONTEXT \u306b\u63a5\u7d9a\u3059\u308b\ndef connect_calc_script() -&gt; Tuple&#x5B;Any, Any, Sheet]:\n    desktop = XSCRIPTCONTEXT.getDesktop()\n    doc = desktop.getCurrentComponent()\n    controller = doc.getCurrentController()\n    sheet = Sheet(controller.getActiveSheet())\n    return desktop, doc, sheet\n\ndef hello_to_cell():\n    ( _, _, sheet ) = connect_calc_script()\n    sheet.cell(0, 0).text = &quot;Hello Excel Like for Python!&quot;\n    sheet.cell(0, 1).text = &quot;\u3053\u3093\u306b\u3061\u306f\u3001Excel Like for Python!&quot;\n    sheet.cell(0,0).column_width = 10000  # \u5e45\u3092\u8a2d\u5b9a\n\n    cell = sheet.cell(0,1)\n    cell.CellBackColor = 0x006400  # \u6fc3\u3044\u7dd1\u306b\u8a2d\u5b9a\n    cell.CharColor = 0xFFFFFF  # \u6587\u5b57\u8272\u3092\u767d\u306b\u8a2d\u5b9a\n\ng_exportedScripts = (\n    hello_to_cell,\n)\n\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" src=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-4-1024x608.png\" alt=\"\" class=\"wp-image-11921\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-4-1024x608.png 1024w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-4-300x178.png 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-4-768x456.png 768w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-4.png 1103w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3093\u306a\u98a8\u306b\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" src=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-5-1024x608.png\" alt=\"\" class=\"wp-image-11922\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-5-1024x608.png 1024w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-5-300x178.png 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-5-768x456.png 768w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-5.png 1103w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">connect_calc_script \u90e8\u5206\u3092\u81ea\u524d\u3067\u66f8\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u304c\u96e3\u70b9\u306a\u306e\u3067\u3001\u3053\u308c\u306f connect_calc \u306b\u3046\u307e\u304f\u5438\u53ce\u3055\u305b\u308b\u4e88\u5b9a\u3067\u3059\u3002Calc \u3068\u63a5\u7d9a\u3057\u305f\u5f8c\u306f\u3001uno api \u306f\u5171\u901a\u5316\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u540c\u3058\u30b3\u30fc\u30c9\u304c\u52d5\u304d\u307e\u3059\u3002\u3064\u307e\u308a ExcelLikeUno \u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u5916\u90e8\u304b\u3089\u3067\u3082\u5185\u90e8\u304b\u3089\u3082\u3067\u52d5\u304f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5185\u90e8\u3067\u4f7f\u3048\u308b Python \u30de\u30af\u30ed\u3067\u4f55\u304c\u826f\u304f\u306a\u308b\u304b\u3068\u8a00\u3046\u3068\u3001\u3053\u3093\u306a\u98a8\u306b vscode \u4f7f\u3063\u3066 Python \u30b3\u30fc\u30c9\u304c\u66f8\u3051\u308b\u3068\u3044\u3046\u70b9\u3067\u3059\u3002Excel VBA \u4e92\u63db\u3084\u3001\u72ec\u81ea Basic \u306e\u30b3\u30fc\u30c9\u3060\u3068\u4ed8\u5c5e\u306e\u30a8\u30c7\u30a3\u30bf\u3067\u3057\u304b\u66f8\u3051\u307e\u305b\u3093\u304c\u3001Python \u30b3\u30fc\u30c9\u306a\u3089\u3070 vscode \u3067\u66f8\u3051\u307e\u3059\u3002\u3055\u3089\u306b\u8a00\u3048\u3070\u3001git \u3068\u9023\u643a\u3082\u3067\u304d\u308b\u306e\u3067\u3001\u30b3\u30fc\u30c9\u306e\u4fdd\u5b58\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-6-1024x576.png\" alt=\"\" class=\"wp-image-11923\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-6-1024x576.png 1024w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-6-300x169.png 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-6-768x432.png 768w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-6-1536x864.png 1536w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2026\/01\/image-6.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3060\u3057\u3001\u30b3\u30fc\u30c9\u4fdd\u5b58\u306e\u5834\u6240\u304c<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nC:\\Users\\\uff1c\u30e6\u30fc\u30b6\u30fc\u540d\uff1e\\AppData\\Roaming\\LibreOffice\\4\\user\\Scripts\\python\\\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u3068\u3044\u3046\u3084\u3084\u3053\u3057\u3044\u5834\u6240\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u304c\u96e3\u70b9\u3067\u3001excellikeuno \u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u3053\u3053\u306b\u914d\u7f6e\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u3053\u308c\u3082\u4eca\u5f8c\u306a\u3093\u3068\u304b\u3057\u3066\u3044\u3053\u3046\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u53c2\u7167\u5148<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/moonmile\/ExcelLikeUno\">https:\/\/github.com\/moonmile\/ExcelLikeUno<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">README.md \u306b\u3082\u3046\u5c11\u3057\u8a73\u3057\u3044\u8aac\u660e\u304c\u3042\u308a\u307e\u3059\u3002Linux \u7248\u3084 Docker \u7248\u306a\u3069\u306f\u3001\u6e96\u5099\u4e2d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b63\u6708\u306b\u3061\u307e\u3061\u307e\u6574\u5099\u3057\u3066\u3044\u305f Excel Like Uno \u304c\u3001\u307e\u3042\u52d5\u304f\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u4eee\u30ea\u30ea\u30fc\u30b9\u3057\u3066\u304a\u304d\u307e\u3059\u3002 https:\/\/github.com\/moonmile\/ExcelLikeUno 12\u6708\u306b LibreOff &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/11916\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,109],"tags":[],"class_list":["post-11916","post","type-post","status-publish","format-standard","hentry","category-dev","category-libreoffice"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/11916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=11916"}],"version-history":[{"count":4,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/11916\/revisions"}],"predecessor-version":[{"id":11932,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/11916\/revisions\/11932"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=11916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=11916"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=11916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}