यह मैं
Object[][] bookData = { { "col1", "col2", 3 }, { "col1", "col2", 3 }, { "col1", "col2", 3 },
{ "col1", "col2", 3 }, { "col1", "col2", 3 }, { "col1", "col2", 3 } };
String[] headers = new String[] { "HEader 1", "HEader 2", "HEader 3" };
int noOfColumns = headers.length;
int rowCount = 0;
Row rowZero = sheet.createRow(rowCount++);
CellStyle style = workbook.createCellStyle();
Font font = workbook.createFont();
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
style.setFont(font);
for (int col = 1; col <= noOfColumns; col++) {
Cell cell = rowZero.createCell(col);
cell.setCellValue(headers[col - 1]);
cell.setCellStyle(style);
}
स्रोत
2016-07-27 06:51:42
के लिए काम किया यह भी उपयोगी है: http://thinktibits.blogspot.com/2012/ 12/जावा-पीओआई-प्रारूप-एक्सेल-सेल-बोल्ड-उदाहरण-प्रोग्राम.html – NoNaMe
यह लिंक आपकी मदद कर सकता है। [http://stackoverflow.com/questions/37188540/java-code-for-excel-row-in-bold-text-style-with-background-color](http://stackoverflow.com/questions/37188540/ जावा-कोड-फॉर एक्सेल-पंक्ति-इन-बोल्ड-टेक्स्ट-शैली-पृष्ठभूमि-रंग के साथ) – Peter