poi单元格部分内容加粗

时间:2025-03-19 14:47:00
/** * poi单元格部分内容加粗 * @throws IOException */ public static void partStrong() throws IOException{ HSSFWorkbook workbook=new HSSFWorkbook(); // 定义一个新的工作簿 Sheet sheet=("第一个Sheet页"); // 创建第一个Sheet页 Row row=(0); // 创建一个行 Cell cell = (0); HSSFFont font = (); //((short) 24); // 字体高度 //("宋体"); // 字体 (true); // 宽度 HSSFRichTextString ts = new HSSFRichTextString("zxadsffasasedwqe"); (0, 10, font); FileOutputStream output = new FileOutputStream(new File("d:/")); (output); if (output != null) { try { (); } catch (IOException e) { (); } } }