⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tableattribute.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</DD>
</DL>
<HR>

<A NAME="setBottomDistance(float)"><!-- --></A><H3>
setBottomDistance</H3>
<PRE>
public void <B>setBottomDistance</B>(float&nbsp;bottomDistance)</PRE>
<DL>
<DD>设置正文文本与表格之间的下边距(说明:只有设置了表格的文字环绕属性后属性才能被设置)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>bottomDistance</CODE> - 表格距正文下的间距 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setWrapAroundText(true); tableAttribute.setBottomDistance(10.0f); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当表格嵌入文本文字环绕为无时,不能设置表格的定位信息<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getBottomDistance()"><CODE>getBottomDistance()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setDefaultCellBottomMargin(float)"><!-- --></A><H3>
setDefaultCellBottomMargin</H3>
<PRE>
public void <B>setDefaultCellBottomMargin</B>(float&nbsp;margin)</PRE>
<DL>
<DD>设置表格默认的单元格下边距。说明:边距的范围为0~1584磅。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>margin</CODE> - 默认单元格下边距(单位为磅值) <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setDefaultCellBottomMargin(30.0f); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定边距超出范围0~1584磅<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getDefaultCellBottomMargin()"><CODE>getDefaultCellBottomMargin()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setDefaultCellLeftMargin(float)"><!-- --></A><H3>
setDefaultCellLeftMargin</H3>
<PRE>
public void <B>setDefaultCellLeftMargin</B>(float&nbsp;margin)</PRE>
<DL>
<DD>设置表格默认的单元格左边距。说明:边距的范围为0~1584磅。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>margin</CODE> - 默认单元格左边距(单位为磅值) <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setDefaultCellLeftMargin(30.0f); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定边距超出范围0~1584磅<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getDefaultCellLeftMargin()"><CODE>getDefaultCellLeftMargin()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setDefaultCellRightMargin(float)"><!-- --></A><H3>
setDefaultCellRightMargin</H3>
<PRE>
public void <B>setDefaultCellRightMargin</B>(float&nbsp;margin)</PRE>
<DL>
<DD>设置表格默认的单元格右边距。说明:边距的范围为0~1584磅。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>margin</CODE> - 默认单元格右边距(单位为磅值) <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setDefaultCellRightMargin(30.0f); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定边距超出范围0~1584磅<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getDefaultCellRightMargin()"><CODE>getDefaultCellRightMargin()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setDefaultCellTopMargin(float)"><!-- --></A><H3>
setDefaultCellTopMargin</H3>
<PRE>
public void <B>setDefaultCellTopMargin</B>(float&nbsp;margin)</PRE>
<DL>
<DD>设置表格默认的单元格上边距。说明:边距的范围为0~1584磅。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>margin</CODE> - 默认单元格上边距(单位为磅值) <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setDefaultCellTopMargin(30.0f); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定边距超出范围0~1584磅<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getDefaultCellTopMargin()"><CODE>getDefaultCellTopMargin()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setHorizontalPosition(int)"><!-- --></A><H3>
setHorizontalPosition</H3>
<PRE>
public void <B>setHorizontalPosition</B>(int&nbsp;position)</PRE>
<DL>
<DD>设置表格定位的水平位置。说明:此位置是相对于文档中的边缘线(边缘线由HorizontalRelative属性定义)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>position</CODE> - 表格相对于边缘线的水平方向上的位置 <pre>     TableConstants.TABLE_GOTO_LEFT     =1    左侧 TableConstants.TABLE_GOTO_RIGHT    =2    右侧 TableConstants.TABLE_GOTO_CENTER   =0    居中 TableConstants.TABLE_GOTO_INSIDE   =3    内侧 TableConstants.TABLE_GOTO_OUTSIDE  =4    外侧 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setWrapAroundText(true); tableAttribute.setHorizontalRelative(TableConstants.TABLE_PARAGRAPH); tableAttribute.setHorizontalPosition(TableConstants.TABLE_GOTO_OUTSIDE); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定表格定位水平位置常量不存在
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当表格嵌入文本文字环绕为无时,不能设置表格的定位信息<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getHorizontalPosition()"><CODE>getHorizontalPosition()</CODE></A>, 
<A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setHorizontalRelative(int)"><CODE>setHorizontalRelative(int)</CODE></A>, 
<A HREF="../../../../application/constants/TableConstants.html" title="application.constants 中的接口"><CODE>TableConstants</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setHorizontalRelative(int)"><!-- --></A><H3>
setHorizontalRelative</H3>
<PRE>
public void <B>setHorizontalRelative</B>(int&nbsp;relativePosition)</PRE>
<DL>
<DD>设置表格水平定位的相对于参数。说明:表格的水平位置是相对于文档中的边缘线定位的,此参数就是边缘线的类型。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>relativePosition</CODE> - 表格水平定位的边缘线的类型 <pre>     TableConstants.TABLE_MARGIN       =0     相对于页边距 TableConstants.TABLE_PAGE         =1     相对于页面 TableConstants.TABLE_PARAGRAPH    =2     相对于段落 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setWrapAroundText(true); tableAttribute.setHorizontalRelative(TableConstants.TABLE_PARAGRAPH); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当表格嵌入文本文字环绕为无时,不能设置表格的定位信息
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当表格水平定位相对于参数常量不存在<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getHorizontalRelative()"><CODE>getHorizontalRelative()</CODE></A>, 
<A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setHorizontalPosition(int)"><CODE>setHorizontalPosition(int)</CODE></A>, 
<A HREF="../../../../application/constants/TableConstants.html" title="application.constants 中的接口"><CODE>TableConstants</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setLeftDistance(float)"><!-- --></A><H3>
setLeftDistance</H3>
<PRE>
public void <B>setLeftDistance</B>(float&nbsp;leftDistance)</PRE>
<DL>
<DD>设置正文文本与表格之间的左边距。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>leftDistance</CODE> - 表格距正文左的间距 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setWrapAroundText(true); tableAttribute.setLeftDistance(10.0f); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当表格嵌入文本文字环绕为无时,不能设置表格的定位信息<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getLeftDistance()"><CODE>getLeftDistance()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setLeftIndent(float)"><!-- --></A><H3>
setLeftIndent</H3>
<PRE>
public void <B>setLeftIndent</B>(float&nbsp;leftIndent)</PRE>
<DL>
<DD>设置表格的左缩进距离,当其小于零时为突出多少距离。 说明:只有表格的对齐方式为左对齐并且表格嵌入文本文字环绕为无时,此方法才有效。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>leftIndent</CODE> - 表格的左缩进距离(单位为磅值),取值范围为-1080到1080之间 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); tableAttribute.setLeftIndent(20.0f); table.setTableAttribute(tableAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当表格的对齐方式不为左对齐并且表格嵌入文本文字环绕不为无时<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#getLeftIndent()"><CODE>getLeftIndent()</CODE></A>, 
<A HREF="../../../../application/constants/TableConstants.html" title="application.constants 中的接口"><CODE>TableConstants</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setPreferredWidth(float)"><!-- --></A><H3>
setPreferredWidth</H3>
<PRE>
public void <B>setPreferredWidth</B>(float&nbsp;width)</PRE>
<DL>
<DD>设置指定表格的宽度。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>width</CODE> - 指定表格的宽度 说明:列宽的度量类型不同,列宽值的语义也不一样。如果,度量类型为固定值,则返回列宽值为磅值,范围在0~1584磅; 如果度量类型为百分比,则返回列宽值是一个相对值,范围在0~100%。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttrib

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -