乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > <em>java</em>导出<em>excel</em>时怎么去掉&l

<em>java</em>导出<em>excel</em>时怎么去掉&l

作者:乔山办公网日期:

返回目录:excel表格制作


你可以参考下这个代码:

Workbook workbook=new HSSFWorkbook(); // 定义一个新的工作簿
Sheet sheet=workbook.createSheet("第一个Sheet页");  // 创建第一个Sheet页
Row row=sheet.createRow(1); // 创建一个行

Cell cell=row.createCell(1); // 创建一个单元格
cell.setCellValue(4);

// 设置单元格边e799bee5baa6e58685e5aeb9335
CellStyle cellStyle=workbook.createCellStyle(); 
cellStyle.setBorderBottom(CellStyle.BORDER_THIN); // 底部边框
cellStyle.setBottomBorderColor(IndexedColors.BLACK.getIndex()); // 底部边框颜色

cellStyle.setBorderLeft(CellStyle.BORDER_THIN);  // 左边边框
cellStyle.setLeftBorderColor(IndexedColors.GREEN.getIndex()); // 左边边框颜色

cellStyle.setBorderRight(CellStyle.BORDER_THIN); // 右边边框
cellStyle.setRightBorderColor(IndexedColors.BLUE.getIndex());  // 右边边框颜色

cellStyle.setBorderTop(CellStyle.BORDER_MEDIUM_DASHED); // 上边边框
cellStyle.setTopBorderColor(IndexedColors.BLACK.getIndex());  // 上边边框颜色


你用的是什么工具导出的excel?POI或者JXL么?那他们的文档中会有详细的属性设置的。


取消excel中文本框的边框的操作步骤:

1、选中需要取消边框的文本框;

2、单击绘图工具格式----文本轮廓----无轮廓即可,如图所示。

相关阅读

关键词不能为空
极力推荐
  • <em>excel</em>如何<em>隔行复制</em>-excel

  • Excel小技巧excel表格怎么做隔行复制隔行粘贴" src="/uploads/tu/733.jpg" style="width: 400px; height: 267px;" />解决Excel快速复制:如何快速隔行复制相同内容的步骤如下:1.首先,我们打开一个excel表格

ppt怎么做_excel表格制作_office365_word文档_365办公网