📄 columns.html
字号:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>方法详细信息</B></FONT></TH>
</TR>
</TABLE>
<A NAME="addColumn(application.workbooks.workbook.tables.Column, int)"><!-- --></A><H3>
addColumn</H3>
<PRE>
public <A HREF="../../../../application/workbooks/workbook/tables/Column.html" title="application.workbooks.workbook.tables 中的类">Column</A> <B>addColumn</B>(<A HREF="../../../../application/workbooks/workbook/tables/Column.html" title="application.workbooks.workbook.tables 中的类">Column</A> beforeColumn,
int direction)</PRE>
<DL>
<DD>在指定列的左边或右边插入一列。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>beforeColumn</CODE> - 指定的列对象<DD><CODE>direction</CODE> - 插入列的方向,只能取以下整型值之一: <pre> TableConstants.INSERT_COLUMN_LEFT 在指定区域的左边插入列 TableConstants.INSERT_COLUMN_RIGHT 在指定区域的右边插入列 </pre>
<DT><B>返回:</B><DD>新插入的表格列对象 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(); Column beforeColumn = columns.getColumn(2); Column column = columns.addColumn(beforeColumn, TableConstants.INSERT_COLUMN_LEFT); column.select(); </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> - 当插入列的方向不存在</DL>
</DD>
</DL>
<HR>
<A NAME="averageColumnWidth()"><!-- --></A><H3>
averageColumnWidth</H3>
<PRE>
public void <B>averageColumnWidth</B>()</PRE>
<DL>
<DD>平均分配表格列集合内所有列的列宽。 说明:平均分配后,集合内每个表格列的列宽相等并等于其平均值。 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); columns.averageColumnWidth(); </pre>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="delete()"><!-- --></A><H3>
delete</H3>
<PRE>
public void <B>delete</B>()</PRE>
<DL>
<DD>删除当前指定表格列的集合。 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2,3); columns.delete(); </pre>
<P>
<DD><DL>
<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/Columns.html#removeColumn(int)"><CODE>removeColumn(int)</CODE></A>,
<A HREF="../../../../application/workbooks/workbook/tables/Column.html#delete()"><CODE>Column.delete()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getBorderAttribute()"><!-- --></A><H3>
getBorderAttribute</H3>
<PRE>
public <A HREF="../../../../application/workbooks/workbook/style/border/BorderAttribute.html" title="application.workbooks.workbook.style.border 中的类">BorderAttribute</A> <B>getBorderAttribute</B>()</PRE>
<DL>
<DD>得到表格列集合外边框的边框属性。
<P>
<DD><DL>
<DT><B>返回:</B><DD>外边框属性 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); BorderAttribute borderAttribute = columns.getBorderAttribute(); System.out.println("返回表格列集合外边框的类型为:"+ borderAttribute.getBorderType()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/Columns.html#setBorderAttribute(application.workbooks.workbook.style.border.BorderAttribute)"><CODE>setBorderAttribute(BorderAttribute)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getColumn(int)"><!-- --></A><H3>
getColumn</H3>
<PRE>
public <A HREF="../../../../application/workbooks/workbook/tables/Column.html" title="application.workbooks.workbook.tables 中的类">Column</A> <B>getColumn</B>(int index)</PRE>
<DL>
<DD>得到指定的表格列。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</CODE> - 指定表格列的索引 说明:这个索引值是指当前连续列集合中的位置,而不是在整个表格中的列号。
<DT><B>返回:</B><DD>指定的表格列对象 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(); Column column = columns.getColumn(2); column.select(); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定的列中含有混合的单元格宽度</DL>
</DD>
</DL>
<HR>
<A NAME="getCount()"><!-- --></A><H3>
getCount</H3>
<PRE>
public int <B>getCount</B>()</PRE>
<DL>
<DD>得到当前表格列集合中列的数目。
<P>
<DD><DL>
<DT><B>返回:</B><DD>列的数目 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(); System.out.println("表格共有" + columns.getCount() + "列"); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getShadingAttribute()"><!-- --></A><H3>
getShadingAttribute</H3>
<PRE>
public <A HREF="../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类">ShadingAttribute</A> <B>getShadingAttribute</B>()</PRE>
<DL>
<DD>得到表格列集合的底纹属性。
<P>
<DD><DL>
<DT><B>返回:</B><DD>列集合的底纹属性 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); ShadingAttribute shadingAttribute = columns.getShadingAttribute(); System.out.println("返回列集合的底纹图案索引:"+ shadingAttribute.getTextureIndex()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/Columns.html#setShadingAttribute(application.workbooks.workbook.style.border.ShadingAttribute)"><CODE>setShadingAttribute(ShadingAttribute)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="nextColumn()"><!-- --></A><H3>
nextColumn</H3>
<PRE>
public <A HREF="../../../../application/workbooks/workbook/tables/Column.html" title="application.workbooks.workbook.tables 中的类">Column</A> <B>nextColumn</B>()</PRE>
<DL>
<DD>得到当前表格列集合的右边一个列对象。
<P>
<DD><DL>
<DT><B>返回:</B><DD>右一列对象 <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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); Column column = columns.nextColumn(); column.select(); </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/Columns.html#previousColumn()"><CODE>previousColumn()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="previousColumn()"><!-- --></A><H3>
previousColumn</H3>
<PRE>
public <A HREF="../../../../application/workbooks/workbook/tables/Column.html" title="application.workbooks.workbook.tables 中的类">Column</A> <B>previousColumn</B>()</PRE>
<DL>
<DD>得到当前表格列集合的左边一个列对象。
<P>
<DD><DL>
<DT><B>返回:</B><DD>左一列对象 <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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -