• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hee9841 / excel-module / #38

25 Apr 2025 09:07AM UTC coverage: 82.791%. Remained the same
#38

push

github

web-flow
Release 0.0.1 (#58)

* Docs: 초기 배포를 위한 docs 추가 (#21)

* Docs: README 추가

* Chore: gitignore에 maven pushing에 사용할 설정 파일 추가

* Deploy: Coveralls 추가, CI 추가 (#22)

* Release 0.0.1

* Deploy: 배포시 Readme 버전 설정 추가 (#25)

* Deploy: 베포시 readme 버전 설정

* Fix: 테스트로 추가했던 dev 브런치 삭제

* Docs: javadocs 관련 의존성 추가 및 배포된 maven repository url 추가 (#30)

* Docs: javaDocs 만들기 위한 추가 의존성 추가

* Docs: Maven Central url README에 추가

* Fix: slf4j-api 의존성의 implementation으로 변경 (#33)

* Feat: 로그 info 메세지 변경 (#34)

* Feat: 로깅 메세지 변경

* Feat: 로그 info 메세지 변경(dto 클래스명 SimpleName에서 패키지 포함으로 변경)

* Feat: Excel, ExcelColumn 어노테이션 정합성 예외 처리 (#35)

* Feat: SystemValues 클레스에 ExcelColumn에 허용되는 타입들 추가

* Feat: Excel, ExcelColumn 어노테이션 관련 적합성에 대한 예외 처리 추가

* Fix: ExcelColumnAnnotationProcessor에 AutoService import

* Fix: Supported source version에 대한 경고 제거 (#36)

* Fix: AutoService 제거

- 의존성 삭제
- 프로세서에 어노테이션 제거

* Fix: 어노테이션 프로세서 SourceVersion을 latestSupported로 변경

* Fix: poi 의존성을 implementation에서 api로 변경 (#38)

* Fix: 에러 메세지 수정(STY_CU_003_B, STG_CT_001_B,STG_ID_002_B 테스트 사항) (#46)

* Fix: 에러 메세지 수정(STY_CU_003_B, STG_CT_001_B,STG_ID_002_B 테스트 사항)

* Style: comment, 및 포멧 수정

* Fix: compile 옵션 변경, toolchain java 버전 변경 (#47)

* Chore: gradle 버전 변경 gradle-8.5 -> gradle-8.10

* Chore: java compile source, target 8 에서 release 8로 변경

- toolchain을 23으로 변경

* Refactor: ExcelExporter의 validate 메서드 추가(data size, sheet Strategy에 따른) (#48)

- validate 오버라이딩으로 생성자의 setSheetStrategy 메서드호출과 initialize 호출 시점 변경,

* Refactor: VerticalAlignment의 default 값을 CENTER로 설정 (#49)

* Refactor: poi 라이브러리의 클래스명과 겹치는 클래스명 변경 (#50)

* Rename: IndexedColor 관련 클래스명 rename

- IndexedColors.java ->  ColorPalette.java
- IndexedExcelColor.java -> PaletteExcelColor.java

* Rename: CellType.java -> ColumnDataType.java으로 클래스명 변경

* Rename: Alignment 관련 Enum 클래스 'Excel' 접두사 추가

* Rename: BorderStyle.java -> ExcelBorderStyle.java로 변경

* Refactor: Excel, ExcelColumn 어노테이션 프로세서 추가 구현 (#52)

* Refactor: ExcelAnnotationProcessor와 ExcelColumnAn... (continued)

105 of 168 new or added lines in 16 files covered. (62.5%)

29 existing lines in 7 files now uncovered.

534 of 645 relevant lines covered (82.79%)

0.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/main/java/io/github/hee9841/excel/strategy/DataFormatStrategy.java
1
package io.github.hee9841.excel.strategy;
2

3
import io.github.hee9841.excel.meta.ColumnDataType;
4

5
/**
6
 * Strategy enum that determines how data formatting is applied to Excel cells.
7
 * <p>
8
 * This enum defines strategies for controlling how cell formatting patterns are determined and
9
 * applied during
10
 * Excel export operations. It works in conjunction with the {@link ColumnDataType}
11
 * to apply appropriate formatting to different types of data.
12
 * <p>
13
 * The available strategies are:
14
 * <ul>
15
 *   <li>{@code NONE}: No automatic formatting is applied. Formatting must be explicitly specified
16
 *       in the {@link io.github.hee9841.excel.annotation.ExcelColumn} annotation.</li>
17
 *   <li>{@code AUTO_BY_CELL_TYPE}: Automatic formatting is applied based on the {@link ColumnDataType}, but only when the
18
 *       {@link io.github.hee9841.excel.annotation.ExcelColumn#columnCellType()} is explicitly set or determined by the {@link CellTypeStrategy} (not when it's NONE).
19
 *       If user specified the {@code format} parameter in the {@link io.github.hee9841.excel.annotation.ExcelColumn} annotation, it will take precedence over the automatic format.
20
 *   </li>
21
 * </ul>
22
 * <p>
23
 * This strategy is typically configured at the class level using the {@link io.github.hee9841.excel.annotation.Excel}
24
 * annotation and affects all columns unless overridden at the column level.
25
 *
26
 * @see io.github.hee9841.excel.annotation.Excel#dataFormatStrategy()
27
 * @see ColumnDataType
28
 * @see io.github.hee9841.excel.format.ExcelDataFormater
29
 * @see io.github.hee9841.excel.format.CellFormats
30
 */
31
public enum DataFormatStrategy {
1✔
32
    /**
33
     * No automatic formatting is applied.
34
     * <p>
35
     * With this strategy, the format pattern must be explicitly specified in the
36
     * {@link io.github.hee9841.excel.annotation.ExcelColumn} annotation using the
37
     * {@code format} parameter. If no format is specified, the default
38
     * format({@link io.github.hee9841.excel.format.CellFormats#_NONE}) for
39
     * the data type will be used.
40
     */
41
    NONE,
1✔
42

43
    /**
44
     * Automatic formatting is applied based on the cell type.
45
     * <p>
46
     * This strategy only applies when the cell type is explicitly set (not NONE) or
47
     * determined by the {@link CellTypeStrategy} (when set to AUTO). It uses the format
48
     * pattern defined for each {@link ColumnDataType} to format
49
     * the cell appropriately for its data type.
50
     * <p>
51
     * Note: If a format pattern is explicitly specified in the
52
     * {@link io.github.hee9841.excel.annotation.ExcelColumn}
53
     * annotation, it will take precedence over the automatic format.
54
     */
55
    AUTO_BY_CELL_TYPE,
1✔
56
    ;
57

58
    public boolean isAutoByColumnDataType() {
59
        return this == AUTO_BY_CELL_TYPE;
1✔
60
    }
61

62
    public boolean isNone() {
UNCOV
63
        return this == NONE;
×
64
    }
65
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc