{"id":37907116,"url":"https://github.com/mygreen/excel-cellformatter","last_synced_at":"2026-01-16T17:12:59.019Z","repository":{"id":28653429,"uuid":"32172788","full_name":"mygreen/excel-cellformatter","owner":"mygreen","description":"Excelのセルの書式を解析してフォーマットするライブラリ。","archived":false,"fork":false,"pushed_at":"2025-04-10T14:46:52.000Z","size":25988,"stargazers_count":10,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T06:59:38.610Z","etag":null,"topics":["excel","java","poi"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mygreen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-13T18:15:12.000Z","updated_at":"2025-02-28T11:03:08.000Z","dependencies_parsed_at":"2024-02-12T03:42:56.285Z","dependency_job_id":null,"html_url":"https://github.com/mygreen/excel-cellformatter","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/mygreen/excel-cellformatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mygreen%2Fexcel-cellformatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mygreen%2Fexcel-cellformatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mygreen%2Fexcel-cellformatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mygreen%2Fexcel-cellformatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mygreen","download_url":"https://codeload.github.com/mygreen/excel-cellformatter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mygreen%2Fexcel-cellformatter/sbom","scorecard":{"id":670731,"data":{"date":"2025-08-11","repo":{"name":"github.com/mygreen/excel-cellformatter","commit":"084c9ae367f1d94e86c8d72adcb4b6e36bcf5b31"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/mygreen/excel-cellformatter/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/mygreen/excel-cellformatter/maven.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/maven.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/mygreen/excel-cellformatter/maven.yml/master?enable=pin","Warn: containerImage not pinned by hash: docker/sphinx/Dockerfile:1: pin your Docker image by updating sphinxdoc/sphinx to sphinxdoc/sphinx@sha256:8d8bdb4649e6577f20ca9a84ef1e1d46911dc65678fe7908b2e2d3a39508e1c8","Warn: pipCommand not pinned by hash: docker/sphinx/Dockerfile:5","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-2qrg-x229-3v8q","Warn: Project is vulnerable to: GHSA-65fg-84f6-3jq3","Warn: Project is vulnerable to: GHSA-f7vh-qwp3-x37m","Warn: Project is vulnerable to: GHSA-fp5r-v3w9-4333","Warn: Project is vulnerable to: GHSA-w9p3-5cr8-m3jj","Warn: Project is vulnerable to: GHSA-4g9r-vxhx-9pgx","Warn: Project is vulnerable to: GHSA-7hfm-57qf-j43q","Warn: Project is vulnerable to: GHSA-crv7-7245-f45f","Warn: Project is vulnerable to: GHSA-mc84-pj99-q6hh","Warn: Project is vulnerable to: GHSA-xqfj-vm6h-2x34","Warn: Project is vulnerable to: GHSA-gmg8-593g-7mv3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T19:56:41.105Z","repository_id":28653429,"created_at":"2025-08-21T19:56:41.105Z","updated_at":"2025-08-21T19:56:41.105Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["excel","java","poi"],"created_at":"2026-01-16T17:12:56.443Z","updated_at":"2026-01-16T17:12:59.014Z","avatar_url":"https://github.com/mygreen.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.mygreen/excel-cellformatter/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.mygreen/excel-cellformatter/)\r\n[![Javadocs](http://javadoc.io/badge/com.github.mygreen/excel-cellformatter.svg?color=blue)](http://javadoc.io/doc/com.github.mygreen/excel-cellformatter)\r\n[![build](https://github.com/mygreen/excel-cellformatter/actions/workflows/maven.yml/badge.svg)](https://github.com/mygreen/excel-cellformatter/actions/workflows/maven.yml)\r\n\r\n# excel-cellformatter\r\nExcelのセルの書式を解析してフォーマットするJavaのライブラリ。\r\n\r\n# 前提条件\r\n+ Java1.8+\r\n+ Apache POI v4.0+\r\n+ Slf4j v1.7+\r\n\r\n\r\n# 設定\r\n\r\n1. excel-cellformatterのライブラリの依存の追加\r\n    ```xml\r\n    \u003cdependency\u003e\r\n        \u003cgroupId\u003ecom.github.mygreen\u003c/groupId\u003e\r\n        \u003cartifactId\u003eexcel-cellformatter\u003c/artifactId\u003e\r\n        \u003cversion\u003e0.12\u003c/version\u003e\r\n    \u003c/dependency\u003e\r\n    ```\r\n\r\n2. ログライブラリの依存関係を追加します。例として、log4jのケースを以下に示します。\r\n    ```xml\r\n    \u003cdependency\u003e\r\n        \u003cgroupId\u003eorg.slf4j\u003c/groupId\u003e\r\n        \u003cartifactId\u003eslf4j-log4j12\u003c/artifactId\u003e\r\n        \u003cversion\u003e1.7.1\u003c/version\u003e\r\n    \u003c/dependency\u003e\r\n    \u003cdependency\u003e\r\n        \u003cgroupId\u003elog4j\u003c/groupId\u003e\r\n        \u003cartifactId\u003elog4j\u003c/artifactId\u003e\r\n        \u003cversion\u003e1.2.14\u003c/version\u003e\r\n    \u003c/dependency\u003e\r\n    ```\r\n\r\n# ビルド方法\r\n\r\n1. Java SE 8をインストール\r\n2. Mavenのインストール\r\n3. jarの作成\r\n    ```console\r\n    # mvn clean package\r\n    ```\r\n3. サイトの生成。(要Docker)\r\n    a. sphinxのdockerビルド。\r\n    ```console\r\n    # docker build -t xlsmapper/sphinx ./docker/sphinx\r\n    ```\r\n    b.サイト生成\r\n    ```console\r\n    # mvn site -Dgpg.skip=true\r\n    ```\r\n\r\n# 簡単な使い方\r\n## Apache POIの場合\r\n\r\nApache POIの場合、POICellFormatter クラスを使います。\r\n\r\n```java\r\nCell cell = /* セルの値の取得 */;\r\n\r\nPOICellFormatter cellFormatter = new POICellFormatter();\r\nString contents = cellForrmatter.formatAsString(cell);\r\n\r\n// ロケールに依存する書式の場合\r\ncontents = cellForrmatter.formatAsString(cell, Locale.US);\r\n\r\n// 文字色の条件が設定されている場合\r\nCellFormatResult result = cellForrmatter.format(cell);\r\nString text = result.getText(); // フォーマット結果の文字列\r\nMSColor textColor = result.getTextColor(); // フォーマットした文字色\r\n\r\n```\r\n\r\n### 注意事項\r\n- 単純にフォーマット結果を文字列として取得する場合、#formatAsString(...)メソッドを呼びます。\r\n- 文字色など書式に条件が設定されている場合、詳細な情報を取得するには、#format(...)メソッドを呼びます。\r\n\r\n## JExcelAPIの場合\r\n\r\nJExcelAPIの場合、JXLCellFormatter クラスを使います。\r\n基本的に、使い方は POICellFormatter と同じです。\r\n\r\n```java\r\n// シートの読み込み\r\nfinal WorkbookSettings settings = new WorkbookSettings();\r\nsettings.setSuppressWarnings(true);\r\nsettings.setGCDisabled(true);\r\n\r\n// 文字コードを「ISO8859_1」にしないと、会計の記号が文字化けする\r\nsettings.setEncoding(\"ISO8859_1\");\r\n\r\nfinal Workbook workbook = Workbook.getWorkbook(in, settings);\r\n\r\nCell cell = /* セルの値の取得 */;\r\n\r\nJXLCellFormatter cellFormatter = new JXLCellFormatter();\r\n\r\nString contents = cellForrmatter.formatAsString(cell);\r\n\r\n// ロケールに依存する書式の場合\r\ncontents = cellForrmatter.formatAsString(cell, Locale.US);\r\n\r\n// 1904年始まりのシートの場合\r\ncontents = cellForrmatter.formatAsString(cell, JXLUtils.isDateStart1904(sheet));\r\n\r\n```\r\n\r\n### JExcelAPIを使用する際の注意事項\r\n- Excelファイルの読み込み時に、文字コードを「ISO8859_1」にする必要がある。指定しない場合は、書式のパターンが文字化けする。Windows-31jでも文字化けする。\r\n- 1904年始まりのファイルの設定の場合、メソッド「JXLUtils.isDateStart1904(...)」で調べる。\r\n\r\n\r\n## Javaのオブジェクトを直接フォーマットする場合\r\n\r\nJavaのオブジェクトの場合、ObjectCellFormatter クラスを使います。\r\n基本的に、使い方は POICellFormatter と同じです。\r\n\r\n```java\r\n\r\nDate date = Timestamp.valueOf(\"2012-02-01 12:10:00.000\");\r\n\r\nObjectCellFormatter cellFormatter = new ObjectCellFormatter();\r\nString contents = cellForrmatter.formatAsString(\"yyyy\\\"年\\\"m\\\"月\\\"d\\\"日\\\";@\", date);\r\n\r\n// ロケールに依存する書式の場合\r\ncontents = cellForrmatter.formatAsString(\"yyyy\\\"年\\\"m\\\"月\\\"d\\\"日\\\";@\", date, Locale.US);\r\n\r\n// 文字色の条件が設定されている場合\r\nCellFormatResult result = cellForrmatter.format(\"[Red]yyyy\\\"年\\\"m\\\"月\\\"d\\\"日\\\";@\", date);\r\nString text = result.getText(); // フォーマット結果の文字列\r\nMSColor textColor = result.getTextColor(); // フォーマットした文字色\r\n\r\n```\r\n\r\n\r\n# ドキュメント\r\nhttps://mygreen.github.io/excel-cellformatter/sphinx/howtouse.html\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmygreen%2Fexcel-cellformatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmygreen%2Fexcel-cellformatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmygreen%2Fexcel-cellformatter/lists"}