Spring

[JXLS] jx:if(condition ์›ํ•˜๋Š” ์…€ ์ƒ‰์ƒ ๋ณ€๊ฒฝํ•˜๊ธฐ

natrue 2021. 8. 11. 17:46
728x90

 

JXLS if๋ฌธ์„ ์‚ฌ์šฉํ•ด์„œ ์›ํ•˜๋Š” ๋ถ€๋ถ„ ์…€ ์ƒ‰์ƒ์„ ๋ณ€๊ฒฝํ•ด๋ณด์ž.

 

[JAVA] JXLS ์—‘์…€ ๋‹ค์šด๋กœ๋“œ

JXLS = JXLS์€ ํ…œํ”Œ๋ฆฟ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์ตœ์ข… ์—‘์…€ํŒŒ์ผ์„ ์ƒ์„ฑ ๋ฐ์ดํ„ฐ (java ๊ฐ์ฒด) + ์—‘์…€ ํ…œํ”Œ๋ฆฟ = ์—‘์…€๊ฒฐ๊ณผ ์ถœ๋ ฅ ์—‘์…€์„ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์—‘์…€์˜ ์„œ์‹, ์ฐจํŠธ, ์ˆ˜์‹๋“ฑ์„ ๋„ฃ์„ ์ˆ˜ ์žˆ๋‹ค. pom.xml org.apache.

truecode-95.tistory.com

 

JXLS -

If-Command Introduction If-Command is a conditional command to output an area depending on a condition specified in the test attribute of the command. Command Attributes The If-Command has the following attributes condition is a conditional expression to t

jxls.sourceforge.net

jx:if(condition="employee.payment <= 2000", lastCell="F9", areas=["A9:F9","A18:F18"])
 condition   ํ…Œ์ŠคํŠธํ•  ์กฐ๊ฑด์‹
 lastCell   ๋ช…๋ น ์˜์—ญ์˜ ๋งˆ์ง€๋ง‰ ์…€์„ ๊ฐ€๋ฆฌํ‚ค๋Š” ๋ชจ๋“  ๋ช…๋ น์˜ ๊ณตํ†ต ์†์„ฑ
 areas  [":",":"] if์กฐ๊ฑด์ด ์ฐธ์ด๋ผ๋ฉด ์•ž / ๊ฑฐ์ง“์ด๋ผ๋ฉด ๋’ค 

 

ex) A1 ์…€์— ๋ฉ”๋ชจ ์กฐ๊ฑด์„ ์ฃผ๊ณ  ์กฐ๊ฑด์ด ์ฐธ์ด๋ผ๋ฉด A3์— ๋„ฃ์–ด๋†“์€ ํ•‘ํฌ ์ƒ‰์ƒ์œผ๋กœ ๋ฐ”๊ฟ”์ฃผ๊ณ  ๊ฑฐ์ง“์ด๋ผ๋ฉด ๊ทธ๋Œ€๋กœ ๋‘”๋‹ค.

 

์กฐ๊ฑด์ด true์ผ ๊ฒฝ์šฐ
์กฐ๊ฑด์ด false์ผ ๊ฒฝ์šฐ