Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Excelを扱うRubyGemまとめ 2022

Keita Mohri
December 02, 2022

Excelを扱うRubyGemまとめ 2022

Qiita Night~Ruby~

Keita Mohri

December 02, 2022
Tweet

More Decks by Keita Mohri

Other Decks in Programming

Transcript

  1. ExcelΛѻ͏RubyGem·ͱΊ 2022 2JJUB/JHIUʙ3VCZʙ  'SJ  ໟརܒଠ 1

  2. ࣗݾ঺հ ໟརܒଠ .PISJ,FJUB ‣ 'VTJD$0 -5% ‣ ઌਐٕज़෦໳*P5νʔϜνʔϜϦʔμʔ ‣ 2JJUB4JMWFSड৆

      $POUSJCVUJPOT  ‣ IUUQTGVTJDDPKQNFNCFST ‣ ؤுͬͯॻ͍͚ͨͲ͋·Γ೔ͷ໨Λݟ͍ͯͳ͍هࣄ  23ίʔυ%FFQ%JWFʔσʔλූ߸Խͱ͔ޡΓగਖ਼ͱ͔ʔ  IUUQTRJJUBDPN,UB.JUFNTGBFCGFF 2
  3. FYDFMHFNݕࡧʂ 3

  4. FYDFMHFNݕࡧʂ 4

  5. &YDFMܥ(FNۀքʹͱͬͯ ͋Μ·Γྑ͘ͳ͍😕

  6. 2JJUB/JHIUτϦΨʔͰ ߋ৽͢Δͧʂ💪

  7. ͜ͷ༨ന͸ͦΕΛॻ͘ʹ͸ڱ͗͢Δ 7 ‣͍Ζ͍Ζௐ΂·͕ͨ͠ɺ݁ߏͳϘϦϡʔϜʹͳͬͯ͠·ͬͨͷͰ 
 ৄࡉ͸Qiitaͷهࣄ, GithubΛ͝ࢀর͍ͩ͘͞ɻ - Qiita: https://qiita.com/Kta-M/items/53083a17b7f0c3645c24 -

    Github : https://github.com/Kta-M/excel_gems
  8. 01 ௐࠪର৅

  9. ௐࠪର৅ 9 ‣The Ruby Toolboxͷ্Ґʹ͋Δ΋ͷ͔Β DBYMTYʹҾ͖ܧ͕ΕͨͷͰআ֎ BYMTYΛSBJMTʹಋೖ͢ΔͨΊͷ (FNͳͷͰআ֎

  10. ௐࠪର৅ 10 ‣The Ruby Toolboxͷ্Ґʹ͋Δ΋ͷ͔Β DBYMTYʹҾ͖ܧ͕ΕͨͷͰআ֎ BYMTYΛSBJMTʹಋೖ͢ΔͨΊͷ (FNͳͷͰআ֎

  11. ೥લͱ΄΅มΘͬͯͳ͍ ʘ ?P? ʗ

  12. ͔ΜͨΜൺֱද 12

  13. 02 ॻ͖ࠐΈ෦໳

  14. ͔ΜͨΜൺֱද 14

  15. TQSFBETIFFU 15

  16. TQSFBETIFFU 16 ‣😄 - ͍Ζ͍Ζͳํ๏ͰηϧʹσʔλΛೖΕΒΕΔ ‣🥲 - ܭࢉ͕ࣜೖྗͰ͖ͳ͍ - σϑΥϧτͷϑΥϯτ͕ઃఆͰ͖ͣɺߦ͝ͱɾηϧ͝ͱʹࢦఆ͢Δඞཁ͕͋Δ

    - ৭͕ΧϥʔύϨοτ͔Β͔͠બ΂ͳ͍ - υΩϡϝϯτ͕खബ - υΩϡϝϯτʹࡌ͍ͬͯͳ͍΋ͷ͸ιʔείʔυΛݟͯճΔඞཁ͕͋Δ - ͦ΋ͦ΋.xls͔͠ରԠ͍ͯ͠ͳ͍ɻɻ
  17. SVCZ9- 17

  18. SVCZ9- 18 ‣😄 - ਺͕ࣜ࢖͑Δ - ॻࣜઃఆܥͷϝιουʹ໋໊نଇ͕͋ͬͯ෼͔Γ΍͍͢ - .xlsx͕ѻ͑ͯɺಡΈࠐΈɺॻ͖ࠐΈ͕Ͱ͖Δͷ͸͜Ε͚ͩ ‣🥲

    - σϑΥϧτͷϑΥϯτ͕ઃఆͰ͖ͣɺߦ͝ͱɾηϧ͝ͱʹࢦఆ͢Δඞཁ͕͋Δ - ܩઢΛҾ͘ͱ͖ɺηϧͷ্ԼࠨӈͦΕͧΕΛݸผʹࢦఆ͢Δඞཁ͕͋Δ - ޿ൣғʹܩઢΛҾ͘ͱ݁ߨॏ͍ - ஋͕ೖ͍ͬͯͳ͍ηϧͷॻࣜΛ͍͡Ζ͏ͱͨ͠ΒౖΒΕΔ
  19. DBYMTY 19

  20. DBYMTY 20 ‣😄 - Example͕ͱͯ΋ॆ࣮͍ͯ͠ΔͷͰಋೖ͠΍͍͢ - ࢦఆൣғʹҰׅͰॻࣜઃఆ͕Ͱ͖Δ - ਺͕ࣜ࢖͑Δ -

    ͳΜͱάϥϑ·Ͱ࡞Εͯ͠·͏ ‣🥲 - উखʹྻͷ෯͕ௐ੔͞Εͯ͠·͏ - ݻఆ͢ΔͳΒஞҰࢦఆ͢Δඞཁ͕͋Δ - جຊతʹExcelͷηϧ൪஍?ͰͷࢦఆʢA1:C1ͳͲ)ʹͳΔ - ߦɾྻͷindex஋͔Βͷม׵ϝιουΛ༻ҙ͢Ε͹ղܾ͚ͩΕͲ΋ - (༨ஊ)͍͟࡞Ζ͏ͱͨ͠ΒҰےೄͰ͸͍͔ͳ͍😏
  21. ϕϯνϚʔΫ 21 ‣͍Ζ͍Ζͳૢ࡞ΛଌͬͯΈͨ ‣શମతʹrubyXL͸ͪΐͬͱॏΊ͔ͳɻɻ

  22. 03 ಡΈࠐΈ෦໳

  23. ͔ΜͨΜൺֱද 23

  24. ׂѪ 24 ‣σʔλΛಡΈऔΔ͚ͩͳΒͲΕͰ΋Ͱ͖Δ

  25. SPP 25 ‣σʔλςʔϒϧΛಡΉͷ͕ಘҙͳҹ৅ - streamͰগͣͭ͠ಡΈࠐΉ͜ͱ͕Ͱ͖Δ - গͳ͍ϝϞϦͰେ͖ͳϑΝΠϧ͕ಡΊΔ - csv, matrix,

    xml, yaml΁ͷม׵͕Մೳ - ϔομΛ༩֤͑ͯߦΛhashͱͯ͠औಘ͢Δ͜ͱ΋Մೳ
  26. 04 ผͷՄೳੑ

  27. "84-BNCEBΛ࢖ͬͯΈΔ 27 ‣.Net Core - Open XML SDK 2.5 for

    Officeͱ͍͏ެࣜSDK͕͋Δ - ͜ΕΛ࢖͑͹Microsoft७ਖ਼ͷϥΠϒϥϦͰExcelϑΝΠϧ͕࡞Εͯ͠·͏ʂ - Open XML SDKΛϥοϓͨ͠ClosedXMLͱ͍͏ϥΠϒϥϦ΋ ‣Python - openpyxlͱ͍͏ϥΠϒϥϦ͕σϑΝΫτΒ͍͠ - ಡΈॻ͖͕Ͱ͖ͯɺάϥϑ΋ग़ͤΔ DTW KTPOͳͲ FYDFM
  28. 7#"Λ࢖͏ 28 ‣VBAΛॻ͍ͨExcelϑΝΠϧΛ࡞ͬͯ࡞ۀऀʹ഑෍͓ͯ͘͠ ‣γεςϜ͔Β؆୯ͳExcel΍CSVΛग़ྗͯ͠ ‣VBA͔ΒͦΕΛಡΈࠐΜͰ΋Βͬͯ໨తͷϑΝΠϧΛ࡞੒ ‣࠷ऴखஈʁ - Ͱ΋ԿͰ΋Ͱ͖Δʂ

  29. 05 ·ͱΊ

  30. ·ͱΊ 30 ‣ಡΈࠐΉ͚ͩͳΒroo ‣ϦονͳாථΛθϩ͔Β࡞ΔͳΒcxlsx ‣ாථͷςϯϓϨʔτΛಡΈࠐΜͰվมͯ͠ग़ྗ͢ΔͳΒrubyXL ‣(Ͳ͏ͯ͠΋.xlsͳΒspreadsheetʣ ‣ඞͣ͠΋rubyͰ΍Βͳͯ͘͸ͳΒͳ͍ͱ͍͏͜ͱ΋ͳ͍ ‣ଓ͖͸WebͰʂ - Qiita:

    https://qiita.com/Kta-M/items/53083a17b7f0c3645c24 - Github : https://github.com/Kta-M/excel_gems
  31. ͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠ Thank You 8FBSF)JSJOH IUUQTSFDSVJUGVTJDDPKQ