怎样删除word2007表格中的回车符号
关键代码如下:FileInputStream fileInputStream = new FileInputStream( soureFile);POIFSFileSystem pfs = new POIFSFileSystem( fileInputStream );HWPFDocument hwpf = new HWPFDocument(pfs);// make a HWPFDocument objectOutputStream output = new FileOutputStream( targetFile );hwpf.write(output);// write to the target fileoutput.close();(2)再word中插入表格。
HWPF的情况:Table tcDataTable = range.insertTableBefore( (short)column , row);//column and row列数和行数tcDataTable.getRow(i).getCell(j).getParagraph(0).getCharacterRun(0).insertBefore("插入i行j列的内容" );XWPF的情况:String outputFile = "D:\\test.doc";XWPFDocument document = new XWPFDocument();XWPFTable tableOne = document.createTable();XWPFTableRow tableOneRowOne = tableOne.getRow(0);tableOneRowOne.getCell(0).setText("11");XWPFTableCell cell12 = tableOneRowOne.createCell();cell12.setText("12");// tableOneRowOne.addNewTableCell().setText("第1行第2列");// tableOneRowOne.addNewTableCell().setText("第1行第3列");// tableOneRowOne.addNewTableCell().setText("第1行第4列");XWPFTableRow tableOneRowTwo = tableOne.createRow();tableOneRowTwo.getCell(0).setText("21");tableOneRowTwo.getCell(1).setText("22");// tableOneRowTwo.getCell(2).setText("第2行第3列");XWPFTableRow tableOneRow3 = tableOne.createRow();tableOneRow3.addNewTableCell().setText("31");tableOneRow3.addNewTableCell().setText("32");FileOutputStream fOut;try {fOut = new FileOutputStream(outputFile);document.write(fOut); fOut.flush();// 操作结束,关闭文件fOut.close();} catch (Exception e) {e.printStackTrace();}
在word2007中画表格若有多余的线怎么删去
设置方法:1、选中去掉底色的表格;2、单击页面布局----页面边框按钮;3、单击表格工具设计----底纹----无颜色即可,如图所示。
Word里如何删除表格的单元格
方法一:1、选择要删除的表格;2、选中整个表格,按delete键删除内容;3、再选中整个表格,同时按住shift和delete健就可以删除整个表格了。
方法二:1、打开Word 2010文档页面,在表格中右键单击需要删除的单元格。
2、在菜单中选择“删除单元格”命令;3、在“删除单元格”对话框选中“右侧单元格左移”选项即可删除当前的单元格。
如果选中“下方单元格上移”,即可删除当前整行。
怎样删除word中的excel表格
方法:打开WORD表格,选中表格中的文字,之后按键盘的Delete键删除即可。
注意:如果是全表格内容删除,不要选择表格下边的段落标记;否则,会连同表格一起删除
转载请注明出处51数据库 » word07删除表格