Poi action Excel set foreground color background

Source: Internet
Author: User

The background color setting in POI is as follows:

HSSFCellStyle cellStyle = wb.createCellStyle();cellStyle.setFillBackgroundColor(HSSFColor.TEAL.index); //设置背景色cellStyle.setFillForegroundColor(HSSFColor.TEAL.index);// 设置前景色    cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);

Attached: Hssfcolor color definition

Color Execution Results
Hssfcolor.royal_blue
Hssfcolor.teal
Hssfcolor.lime
Hssfcolor.pale_blue
Hssfcolor.aqua
Hssfcolor.green
Hssfcolor.turquoise
Hssfcolor.dark_blue
Hssfcolor.cornflower_blue
Hssfcolor.olive_green
Hssfcolor.white
Hssfcolor.light_turquoise
Hssfcolor.lemon_chiffon
Hssfcolor.light_green
Hssfcolor.blue
Hssfcolor.dark_red
Hssfcolor.coral
Hssfcolor.red
Hssfcolor.light_yellow
Hssfcolor.sky_blue
Hssfcolor.brown
Hssfcolor.sea_green
Hssfcolor.indigo
Hssfcolor.maroon
Hssfcolor.grey_80_percent
Hssfcolor.grey_25_percent
Hssfcolor.dark_green
Hssfcolor.yellow
Hssfcolor.gold
Hssfcolor.grey_40_percent
Hssfcolor.dark_teal
Hssfcolor.pink
Hssfcolor.orchid
Hssfcolor.light_blue
Hssfcolor.light_cornflower_blue
Hssfcolor.black
Hssfcolor.dark_yellow
Hssfcolor.violet
Hssfcolor.lavender
Hssfcolor.rose
Hssfcolor.blue_grey
Hssfcolor.light_orange
Hssfcolor.orange
Hssfcolor.grey_50_percent


Itmyhome

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Poi action Excel set foreground color background

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.