Skip to content

πŸ“‹ μ—‘μ…€ νŒŒμΌμ„ json으둜 λ§Œλ“€μ–΄μ£ΌλŠ” 슀크립트

Notifications You must be signed in to change notification settings

0x1f440/xlsx-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

xlsx to json

λ‹€κ΅­μ–΄ λŒ€μ‚¬ 관리λ₯Ό μœ„ν•΄ λ§Œλ“  κ°„λ‹¨ν•œ μŠ€ν¬λ¦½νŠΈμž…λ‹ˆλ‹€.

  • main.py와 같은 폴더에 μžˆλŠ” λͺ¨λ“  xlsx ν™•μž₯자의 파일 λ‚΄μ˜ λͺ¨λ“  μ‹œνŠΈλ₯Ό json으둜 λ³€ν™˜ν•©λ‹ˆλ‹€.

  • A열을 μ œμ™Έν•œ λͺ¨λ“  μ—΄μ˜ 1번째 행은 폴더λͺ…μœΌλ‘œ μ‚¬μš©λ©λ‹ˆλ‹€. 결과물은 ν•΄λ‹Ή μ΄λ¦„μ˜ 폴더 생성 ν›„ sheetname.json의 ν˜•νƒœλ‘œ μ €μž₯λ©λ‹ˆλ‹€.

  • A열은 ν˜„μž¬ μ‹œνŠΈμ˜ λͺ¨λ“  μ—΄μ—μ„œ key둜 μ‚¬μš©λ©λ‹ˆλ‹€. Bμ—΄ μ΄ν›„λŠ” 각 열이 Aμ—΄μ˜ key에 μŒμ„ μ΄λ£¨λŠ” valueλ‘œμ„œ 각각 ν•œ 개의 json파일둜 μ €μž₯λ©λ‹ˆλ‹€.

Examples

Input (sample.xlsx)

.
β”œβ”€β”€ sample.xlsx         # file to convert 
└── main.py

sample.xlsx - sheet1

A B C
1 EN KR
2 key1 first text 첫 번째 ν…μŠ€νŠΈ
3 key2 second text 두 번째 ν…μŠ€νŠΈ

Output

.
β”œβ”€β”€ EN             
β”‚   └── sheet1.json
β”œβ”€β”€ KR
β”‚   └── sheet1.json    
β”œβ”€β”€ sample.xlsx         # file to convert 
└── main.py

EN/sheet1.json

{"key1":"first text","key2":"second text"}

KR/sheet1.json

{"key1":"첫 번째 ν…μŠ€νŠΈ","key2":"두 번째 ν…μŠ€νŠΈ"}

About

πŸ“‹ μ—‘μ…€ νŒŒμΌμ„ json으둜 λ§Œλ“€μ–΄μ£ΌλŠ” 슀크립트

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages