Skip to content

Commit fe767e2

Browse files
committed
Update document for v1.3.3
1 parent cc0231b commit fe767e2

File tree

4 files changed

+74
-26
lines changed

4 files changed

+74
-26
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22

33
## v1.3.3 - Docs Sync & Version Bump (2025-10-31)
44

5-
### 📝 Documentation
5+
### ✨ New/Changed
6+
- Added `exceptColumns` attribute to exclude specific columns from sheet output
7+
- XML: `<sheet name="..." exceptColumns="ColA, ColB">` (comma-separated)
8+
- JSON: supports `"exceptColumns": ["ColA", "ColB"]` or legacy `"except_columns": ["ColA", "ColB"]`
9+
- Case-insensitive key detection; backward compatible with `except_columns`
10+
- Behavior: specified columns are removed from the recordset before writing files (Excel/CSV/TXT), so they are not included in outputs
611
- Synchronized KR/EN documents (README, USER_MANUAL, CHANGELOG)
712
- Updated package version to 1.3.3
813

14+
### 🔧 Code Changes
15+
- `src/query-parser.js`: Parse `exceptColumns` (and `except_columns`) from XML/JSON and normalize to array
16+
- `src/index.js`: When a sheet defines `exceptColumns`, remove those columns from result rows prior to export
17+
18+
### 📝 Documentation
19+
- README/README_KR, USER_MANUAL/USER_MANUAL_KR, CHANGELOG/CHANGELOG_KR updated accordingly
20+
921
## v1.3.2 - CSV/TXT Formatting & Directory Naming (2025-10-31)
1022

1123
### ✨ New/Changed

CHANGELOG_KR.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,26 @@
22

33
## v1.3.3 - 문서 동기화 및 버전 올림 (2025-10-31)
44

5-
### 📝 문서
6-
- KR/EN 문서(README, USER_MANUAL, CHANGELOG) 동기화
7-
- 패키지 버전을 1.3.3으로 업데이트
8-
9-
## v1.3.2 - CSV/TXT 포맷팅 및 디렉토리 명명 변경 (2025-10-31)
10-
115
### ✨ 변경 사항
12-
- 시트별 내보내기 디렉토리 명명 단순화
13-
- 디렉토리가 이제 `<출력파일베이스>`로 생성됩니다 (확장자 접미사 제거)
14-
- 예: `output="d:/temp/report.csv"` → 디렉토리 `d:/temp/report/`
15-
- CSV/TXT 필드 포맷팅 변경
16-
- CSV 인용/이스케이프 규칙은 출력 확장자가 `.csv`일 때만 적용
17-
- 비-CSV(예: `.txt`, `.sql` 등)는 인용 없이 값 그대로 출력
18-
- 필드 내부 줄바꿈(\r/\n)은 CSV/TXT 모두 공백으로 정규화
19-
- 레코드 구분 개행은 CRLF 유지, 헤더는 계속 포함
20-
- 날짜 값은 CSV/TXT 및 SQL 리터럴에서 `yyyy-MM-dd HH:mm:ss`(24시간) 형식으로 직렬화
6+
- 시트에서 특정 컬럼을 결과에서 제외하는 `exceptColumns` 속성 추가
7+
- XML: `<sheet name="..." exceptColumns="ColA, ColB">`와 같이 쉼표로 구분해 지정
8+
- JSON: `"exceptColumns": ["ColA", "ColB"]` 또는 `"except_columns": ["ColA", "ColB"]` 지원
9+
- 대소문자 구분 없이 키 탐색, 하위 호환으로 `except_columns`도 인식
10+
- 동작: 내보내기 전에 지정된 컬럼을 레코드셋에서 제거하여 파일(Excel/CSV/TXT)에 포함되지 않도록 처리
11+
- 예시:
12+
```sql
13+
<sheet name="사용자 목록" exceptColumns="password, email">
14+
SELECT * FROM users
15+
</sheet>
16+
```
2117

2218
### 🔧 코드 변경
23-
- `src/excel-generator.js`
24-
- `isCsv` 플래그 추가 및 포맷별 값 포매터 분기
25-
- `escapeCsv()`에서 인용 전 내부 줄바꿈 정규화
26-
- 비-CSV용 `toPlain()`에 내부 줄바꿈 정규화 추가
27-
- 시트별 대상 디렉토리 `<base>_<ext>``<base>`로 변경
19+
- `src/query-parser.js`: XML/JSON에서 `exceptColumns`(및 `except_columns`) 파싱하여 배열로 표준화
20+
- `src/index.js`: 시트 정의의 `exceptColumns`가 있으면 해당 컬럼들을 결과에서 제거하는 전처리 적용
2821

2922
### 📝 문서
30-
- README/README_KR: 시트별 디렉토리 규칙 및 CSV/TXT 줄바꿈 정규화, 인용 적용 범위 반영
31-
- USER_MANUAL/USER_MANUAL_KR: 시트별 내보내기 섹션에 디렉토리 명명 및 포맷팅 규칙 업데이트
32-
- CHANGELOG/CHANGELOG_KR: v1.3.2 항목 추가
23+
- KR/EN 문서(README, USER_MANUAL, CHANGELOG) 동기화
24+
- 패키지 버전을 1.3.3으로 업데이트
3325

3426
## v1.3.1 - 파일명 변수 및 DATE 개선 (2025-10-30)
3527

USER_MANUAL.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ SQL2Excel is a powerful Node.js-based tool for generating Excel files from SQL q
2121

2222
### What's New (v1.3.3)
2323

24+
- Added `exceptColumns` sheet option (XML/JSON) to exclude specific columns from outputs
2425
- Documentation synchronization across KR/EN
2526
- Package version updated to 1.3.3
2627

@@ -142,6 +143,22 @@ Create `config/dbinfo.json` file:
142143
- CSV/TXT formatting: `.csv` applies CSV quoting/escaping; non-CSV writes plain values; internal newlines (\r/\n) normalized to spaces for both
143144
- Dates: `yyyy-MM-dd HH:mm:ss` (24-hour)
144145

146+
### Sheet option: exceptColumns (v1.3.3)
147+
148+
- Purpose: Exclude specific columns from the final files (Excel/CSV/TXT) for a sheet
149+
- XML: `<sheet name="..." exceptColumns="ColA, ColB">` (comma-separated)
150+
- JSON: supports `"exceptColumns": ["ColA", "ColB"]` and legacy `"except_columns": ["ColA", "ColB"]`
151+
- Case-insensitive key detection
152+
- Behavior: columns listed are removed from the recordset just before export, so they never appear in outputs
153+
- Example:
154+
```xml
155+
<sheet name="UserList" use="true" exceptColumns="password, email">
156+
<![CDATA[
157+
SELECT * FROM users
158+
]]>
159+
</sheet>
160+
```
161+
145162
## 🚀 Basic Usage
146163

147164
### Language Settings

USER_MANUAL_KR.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ SQL2Excel은 고급 스타일링, 템플릿 지원, 독립 실행 파일 배포
2121

2222
### v1.3.3 주요 변경
2323

24-
- KR/EN 문서 동기화 및 소규모 정리
25-
- 패키지 버전을 1.3.3으로 업데이트
24+
- 시트에서 특정 컬럼 제외를 위한 `exceptColumns` 속성 추가 (XML/JSON)
2625

2726
### 주요 기능
2827
- 📊 **다중 시트 지원**: 하나의 엑셀 파일 내에서 여러 SQL 쿼리 결과를 별도의 시트에 저장
@@ -131,6 +130,34 @@ npm run build
131130
}
132131
```
133132

133+
### 시트별 내보내기 (CSV/TXT)
134+
135+
- Routing by `excel.output` extension
136+
- `.xlsx`/`.xls` → Single Excel workbook
137+
- `.csv` → Per-sheet CSV
138+
- Others → Per-sheet TXT (tab-delimited)
139+
- Output directory and filenames
140+
- Files are written under `<output_basename>` (updated in v1.3.2)
141+
- Each file name is the sheet `originalName` (sanitized, max 100 chars). No 31-char limit (Excel-only)
142+
- CSV/TXT formatting: `.csv` applies CSV quoting/escaping; non-CSV writes plain values; internal newlines (\r/\n) normalized to spaces for both
143+
- Dates: `yyyy-MM-dd HH:mm:ss` (24-hour)
144+
145+
### Sheet 옵션: exceptColumns (v1.3.3)
146+
147+
- 목적: 시트 쿼리 결과에서 특정 컬럼을 최종 파일(Excel/CSV/TXT)에 포함하지 않도록 제외
148+
- XML: `<sheet name="..." exceptColumns="ColA, ColB">` (쉼표로 구분)
149+
- JSON: `"exceptColumns": ["ColA", "ColB"]` 또는 하위호환 `"except_columns": ["ColA", "ColB"]`
150+
- 키 대소문자 구분 없이 탐색 (case-insensitive)
151+
- 동작: 내보내기 직전에 지정 컬럼을 레코드셋에서 제거하여 모든 출력 포맷에서 배제
152+
- 예시:
153+
```xml
154+
<sheet name="UserList" use="true" exceptColumns="password, email">
155+
<![CDATA[
156+
SELECT * FROM users
157+
]]>
158+
</sheet>
159+
```
160+
134161
## 🚀 기본 사용법
135162

136163
### 언어 설정

0 commit comments

Comments
 (0)