📄 columns.html
字号:
application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); Column column = columns.previousColumn(); 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#nextColumn()"><CODE>nextColumn()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="removeColumn(int)"><!-- --></A><H3>
removeColumn</H3>
<PRE>
public void <B>removeColumn</B>(int index)</PRE>
<DL>
<DD>删除指定的表格列。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</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); application.workbooks.workbook.tables.Columns columns = table.getColumns(); columns.removeColumn(2); </pre>
<DT><B>抛出:</B>
<DD><CODE>当指定表格行的索引超出范围</CODE><DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/Columns.html#delete()"><CODE>delete()</CODE></A>,
<A HREF="../../../../application/workbooks/workbook/tables/Column.html#delete()"><CODE>Column.delete()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="select()"><!-- --></A><H3>
select</H3>
<PRE>
public void <B>select</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.select(); </pre>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setBorderAttribute(application.workbooks.workbook.style.border.BorderAttribute)"><!-- --></A><H3>
setBorderAttribute</H3>
<PRE>
public void <B>setBorderAttribute</B>(<A HREF="../../../../application/workbooks/workbook/style/border/BorderAttribute.html" title="application.workbooks.workbook.style.border 中的类">BorderAttribute</A> borderAttribute)</PRE>
<DL>
<DD>设置表格列集合外边框的边框属性。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>borderAttribute</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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); BorderAttribute borderAttribute = columns.getBorderAttribute(); borderAttribute.setBorderType(BorderAndShadingConstants.BORDERTYPE_BOX); borderAttribute.setBorderLineType(BorderAndShadingConstants.TOP,1); borderAttribute.setBorderLineType(BorderAndShadingConstants.LEFT,3); borderAttribute.setBorderLineType(BorderAndShadingConstants.RIGHT,6); borderAttribute.setBorderLineType(BorderAndShadingConstants.BOTTOM,8); borderAttribute.setBorderLineColor(BorderAndShadingConstants.TOP,Color.RED); borderAttribute.setBorderLineColor(BorderAndShadingConstants.LEFT,Color.CYAN); borderAttribute.setBorderLineColor(BorderAndShadingConstants.RIGHT,Color.YELLOW); borderAttribute.setBorderLineColor(BorderAndShadingConstants.BOTTOM,Color.ORANGE); borderAttribute.setBorderLineWidth(BorderAndShadingConstants.TOP,8f); borderAttribute.setBorderLineWidth(BorderAndShadingConstants.LEFT,5f); borderAttribute.setBorderLineWidth(BorderAndShadingConstants.RIGHT,3f); borderAttribute.setBorderLineWidth(BorderAndShadingConstants.BOTTOM,1f); columns.setBorderAttribute(borderAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数为NULL<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/Columns.html#getBorderAttribute()"><CODE>getBorderAttribute()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setColumnWidth(float)"><!-- --></A><H3>
setColumnWidth</H3>
<PRE>
public void <B>setColumnWidth</B>(float columnWidth)</PRE>
<DL>
<DD>设置表格列集合内所有列的列宽。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>columnWidth</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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); columns.setColumnWidthMeasure(TableConstants.COLUMN_WIDTH_MEASURE); columns.setColumnWidth(40.0f); </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#setColumnWidthMeasure(int)"><CODE>setColumnWidthMeasure(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setColumnWidthMeasure(int)"><!-- --></A><H3>
setColumnWidthMeasure</H3>
<PRE>
public void <B>setColumnWidthMeasure</B>(int measureType)</PRE>
<DL>
<DD>设置表格列集合内所有列的宽度的度量类型。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>measureType</CODE> - 列宽度的度量类型,只能取下面值之一: <pre> TableConstants.COLUMN_WIDTH_NONE_SET 不指定列宽度 TableConstants.COLUMN_WIDTH_MEASURE 指定列宽度为绝对值 TableConstants.COLUMN_WIDTH_PRECENT 指定列宽度为百分比 </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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); columns.setColumnWidthMeasure(TableConstants.COLUMN_WIDTH_PRECENT); columns.setColumnWidth(40.0f); </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#setColumnWidth(float)"><CODE>setColumnWidth(float)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setShadingAttribute(application.workbooks.workbook.style.border.ShadingAttribute)"><!-- --></A><H3>
setShadingAttribute</H3>
<PRE>
public void <B>setShadingAttribute</B>(<A HREF="../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类">ShadingAttribute</A> shadingAttribute)</PRE>
<DL>
<DD>设置表格列集合的底纹属性。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>shadingAttribute</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); application.workbooks.workbook.tables.Columns columns = table.getColumns(2, 3); ShadingAttribute shadingAttribute = columns.getShadingAttribute(); shadingAttribute.setTextureIndex(10); columns.setShadingAttribute(shadingAttribute); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数为NULL<DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/Columns.html#getShadingAttribute()"><CODE>getShadingAttribute()</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../application/workbooks/workbook/tables/Column.html" title="application.workbooks.workbook.tables 中的类"><B>上一个类</B></A>
<A HREF="../../../../application/workbooks/workbook/tables/Row.html" title="application.workbooks.workbook.tables 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?application/workbooks/workbook/tables/Columns.html" target="_top"><B>框架</B></A>
<A HREF="Columns.html" target="_top"><B>无框架</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>所有类</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
摘要: 嵌套 | 字段 | 构造方法 | <A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: 字段 | 构造方法 | <A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
版权所有 2001-2006 无锡永中科技有限公司
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -