| | |
| | | import com.whyc.util.ActionUtil; |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | import org.apache.poi.ss.usermodel.ClientAnchor; |
| | | import org.apache.poi.ss.usermodel.IndexedColors; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | HSSFWorkbook wb = new HSSFWorkbook(); |
| | | //字体格式-加粗 |
| | | HSSFCellStyle cellStyle = wb.createCellStyle(); |
| | | cellStyle.setFillForegroundColor(IndexedColors.GOLD.getIndex());//添加前景色,内容看的清楚 |
| | | cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); |
| | | HSSFFont font = wb.createFont(); |
| | | font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); |
| | | font.setColor(HSSFFont.COLOR_RED); |
| | | //font.setColor(HSSFFont.COLOR_RED); |
| | | cellStyle.setFont(font); |
| | | |
| | | HSSFSheet sheet = wb.createSheet("bom_"+pHistory.getVersion()+"信息"); |