//设置表格样式
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderLeft).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderLeft).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderLeft).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderTop).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderTop).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderTop).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderBottom).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderBottom).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderBottom).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderHorizontal).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderHorizontal).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderHorizontal).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderVertical).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderVertical).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderVertical).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderRight).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderRight).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderRight).Color = Word.WdColor.wdColorAutomatic;

// wordDoc.Tables.Item(k).Borders.Item(Word.WdBorderType.wdBorderDiagonalDown).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
// wordDoc.Tables.Item(k).Borders.Item(Word.WdBorderType.wdBorderDiagonalDown).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
// wordDoc.Tables.Item(k).Borders.Item(Word.WdBorderType.wdBorderDiagonalDown).Color = Word.WdColor.wdColorAutomatic;
//第一行显示
wordDoc.Tables.Item(1).Cell(1,2).Merge(wordDoc.Tables.Item(1).Cell(1,3));
wordDoc.Tables.Item(1).Cell(1,4).Merge(wordDoc.Tables.Item(1).Cell(1,5));

Delphi设置表格样式的更多相关文章

  1. delphi 设置表格样式。

    //设置表格样式 wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderLeft).LineStyle = Word.WdLine ...

  2. asp.net数据导出到excel表格,并设置表格样式

    1.首先在项目中添加引用

  3. PHPExcel探索之旅---阶段二 设置表格样式

    1.设置表格的默认样式为水平居中.垂直居中 getDefaultStyle()函数用来设置默认样式 由活动sheet对象来调用,setVertical()函数和setHorizontal()函数分别用 ...

  4. PHP导出Excel,设置表格样式,填充颜色等较为复杂样式

    // 注:只是在此做下记录,有兴趣的可以参考,不做实际教程文档 <?php //引入Li类对数据进行操作include_once('./Li.php');//引入Excel类库对对数据进行操作i ...

  5. 黄聪:phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护

    首先到phpexcel官网上下载最新的phpexcel类,下周解压缩一个classes文件夹,里面包含了PHPExcel.php和PHPExcel的文件夹,这个类文件和文件夹是我们需要的,把class ...

  6. phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护

    转:http://www.cnblogs.com/huangcong/p/3687665.html 首先到phpexcel官网上下载最新的phpexcel类,下周解压缩一个classes文件夹,里面包 ...

  7. Java 操作Word表格——创建嵌套表格、添加/复制表格行或列、设置表格是否禁止跨页断行

    本文将对如何在Java程序中操作Word表格作进一步介绍.操作要点包括 如何在Word中创建嵌套表格. 对已有表格添加行或者列 复制已有表格中的指定行或者列 对跨页的表格可设置是否禁止跨页断行 创建表 ...

  8. JQuery EasyUI DataGrid根据条件设置表格行样式(背景色)

    1.javascript定义函数返回样式 <script type="text/javascript"> //根据条件设置表格行背景颜色 function setRow ...

  9. CSS:表格样式(设置表格边框/文字/背景的样式)

    使用CSS能够制作出十分精美的表格. 代码整理自w3school:http://www.w3school.com.cn 效果图: 代码: <!DOCTYPE html PUBLIC " ...

随机推荐

  1. 删除emacs临时文件

    emacs编辑文件后产生的带小尾巴(~)的文件,你有没有强迫症,要删之而后快rm -rf *~ 你有没有不小心敲成了rm -rf ~,然后爽快的按下了回车,然后欲哭无泪,哈哈- 其实,可以设置在ema ...

  2. Android开发之深入理解NFC(一)

    深入理解NFC NFC(Near field communication,近场通信)也叫做近距离无线通信技术. 从原理来说,NFC和wifi类似,二者都利用无线射频技术来实现设备之间的通信. 但是,和 ...

  3. 长时间停留在calculating requirements and dependencies

    如果安装插件的时候,Eclipse花费了很长的时间calculating requirements and dependencies(计算需求和依赖性 )这个问题通常就是在点击安装之后显示“Calcu ...

  4. Hadoop各个启动流

    (0)如果集群是第一次启动,需要格式化namenodehadoop@node1:~$ hdfs namenode –format (1)启动HDFS:hadoop@master:~$ start-df ...

  5. 小试maven工程

    由于工作中要用到maven来进行开发j2ee开发,所以选用了集成maven的eclipse版本: 下载地址: https://www.eclipse.org/downloads/ 根据提示下载32或者 ...

  6. scvmm2008 错误 2941 0x80072efe

    该错误是由于vmm和主机之间的证书不匹配所导致的. 1. 运行mmc,文件=>添加管理单元=>添加证书=>计算机账户=>本地计算机. 2. 在下图各个目录证书下删除和vmm关联 ...

  7. 自己动手设计并实现一个linux嵌入式UI框架(设计)

    看了"自己动手设计并实现一个linux嵌入式UI框架"显然没有尽兴,因为还没有看到庐山真面目,那我今天继续,先来说说,我用到了哪些知识背景.如:C语言基础知识,尤其是指针.函数指针 ...

  8. jquery中animate({left:'-='+width})中的 '-='+是什么意思?

    left:'-='+width的意思是:left属性的最终值,是left现有值减去width这个值 例如:left:'200px' 意思是left最终值变成200left:'+200px' 意思与上面 ...

  9. [AGC006E] Rotate 3x3 树状数组+贪心

    Description ​ XFZ在北京一环内有一套房. ​ XFZ房子的地砖呈网格状分布,是一个3∗N3∗N的网格.XFZ在买下这套房时,每个地砖上有一个数字,位置为(i,j)(i,j)的地砖上的数 ...

  10. 在iOS7中修改键盘Return键的类型

    今天将之前运行在iOS7之前的一段代码拿出来,在iOS7的机器上运行,发现键盘上的ReturnKeyType不能被修改了. 经过几番查找资料,了解到iOS7中UISearchBar的结构发生了变化,将 ...