📄 section.html
字号:
<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="getBaseText()"><!-- --></A><H3>
getBaseText</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/BaseText.html" title="application.workbooks.workbook.documents.document.section 中的类">BaseText</A> <B>getBaseText</B>()</PRE>
<DL>
<DD>返回当前章节的正文部分。
<P>
<DD><DL>
<DT><B>返回:</B><DD>BaseText类,即当前章节的正文 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/section/BaseText.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>BaseText</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getColumn()"><!-- --></A><H3>
getColumn</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/Column.html" title="application.workbooks.workbook.documents.document 中的类">Column</A> <B>getColumn</B>()</PRE>
<DL>
<DD>获得当前章节的分栏对象。
<P>
<DD><DL>
<DT><B>返回:</B><DD>Column类,即本章节的分栏对象 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); Column column = section.getColumn(); column.setCount(3); column.setEqualsWidth(false); column.setWidth(0, 100.0f); column.setWidth(1, 200.0f); column.setWidth(2, 100.0f); section.setColumn(column); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Column.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>Column</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getEndNote(int)"><!-- --></A><H3>
getEndNote</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/EndNote.html" title="application.workbooks.workbook.documents.document.section 中的类">EndNote</A> <B>getEndNote</B>(int index)</PRE>
<DL>
<DD>返回当前章节的尾注部分。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</CODE> - 得到的是第几个尾注 注:index的起始位置为0,如果没有尾注,返回null,如果index大于等于尾注的总数,也返回null。 注: EIO刚启动时只有正文、页眉、页脚这三个部分,而脚注、尾注部分必须在以后由用户自己插入。
<DT><B>返回:</B><DD>EndNote类,即索引值指定的某一个尾注 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); EndNote en1 = baseText.addEndNote(10,5); en1.insertText(0,"this is endnote1"); EndNote en2 = baseText.addEndNote(1,5); en2.insertText(0,"this is endnote2"); EndNote endNote = section.getEndNote(0); System.out.println("第一个尾注的内容是:"+endNote.getText(0,endNote.getTextLength())); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getFootNote(int)"><CODE>getFootNote(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/section/EndNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>EndNote</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getEndNoteCount()"><!-- --></A><H3>
getEndNoteCount</H3>
<PRE>
public int <B>getEndNoteCount</B>()</PRE>
<DL>
<DD>获得当前章节的尾注个数。
<P>
<DD><DL>
<DT><B>返回:</B><DD>当前章节的尾注个数。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); EndNote endNote = baseText.addEndNote(10,5); endNote.insertText(0,"this is a test!"); System.out.println("当前章节共有"+section.getEndNoteCount()+"个尾注"); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getFooter()"><!-- --></A><H3>
getFooter</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/Footer.html" title="application.workbooks.workbook.documents.document.section 中的类">Footer</A> <B>getFooter</B>()</PRE>
<DL>
<DD>返回当前章节的默认页脚(每一页的页脚都相同)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>Footer类,即当前章节的默认页脚 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); Footer footer = section.getFooter(); footer.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getFooter(int)"><CODE>getFooter(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getHeader()"><CODE>getHeader()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getHeader(int)"><CODE>getHeader(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/section/Footer.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>Footer</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFooter(int)"><!-- --></A><H3>
getFooter</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/Footer.html" title="application.workbooks.workbook.documents.document.section 中的类">Footer</A> <B>getFooter</B>(int footerType)</PRE>
<DL>
<DD>返回当前章节的指定页脚。 注:页脚可分为首页不同,奇数页不同,偶数页不同三种不同的形式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>footerType</CODE> - 指定当前章节的页脚属于哪一种形式 <pre> HeaderFooterConstants.FIRST_PAGE 首页 HeaderFooterConstants.ODD 奇数页 HeaderFooterConstants.EVEN 偶数页 </pre>
<DT><B>返回:</B><DD>Footer类,即当前章节的指定页脚 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); Footer oddfooter = section.getFooter(HeaderFooterConstants.ODD); oddfooter.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); </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/documents/document/Section.html#getFooter()"><CODE>getFooter()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getHeader()"><CODE>getHeader()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getHeader(int)"><CODE>getHeader(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/section/Footer.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>Footer</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFootNote(int)"><!-- --></A><H3>
getFootNote</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/FootNote.html" title="application.workbooks.workbook.documents.document.section 中的类">FootNote</A> <B>getFootNote</B>(int index)</PRE>
<DL>
<DD>返回当前章节的脚注部分。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</CODE> - 得到的是第几个脚注 注:index的起始位置为0,如果没有脚注,就返回null,如果index大于等于脚注的总数,也返回null。 注: EIO刚启动时只有正文、页眉、页脚这三个部分,而脚注、尾注部分必须在以后由用户自己插入。
<DT><B>返回:</B><DD>FootNote类,即索引值指定的某一个脚注 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); FootNote fn1 = baseText.addFootNote(10,5); fn1.insertText(0,"this is footnote1"); FootNote fn2 = baseText.addFootNote(1,5); fn2.insertText(0,"this is footnote2"); FootNote footNote = section.getFootNote(0); System.out.println("第一个脚注的内容是:"+footNote.getText(0,footNote.getTextLength())); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getEndNote(int)"><CODE>getEndNote(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/section/FootNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>FootNote</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFootNoteCount()"><!-- --></A><H3>
getFootNoteCount</H3>
<PRE>
public int <B>getFootNoteCount</B>()</PRE>
<DL>
<DD>获得当前章节的脚注个数。
<P>
<DD><DL>
<DT><B>返回:</B><DD>当前章节的脚注个数。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); FootNote footNote = baseText.addFootNote(10,5); footNote.insertText(0,"this is a test!"); System.out.println("当前章节共有"+section.getFootNoteCount()+"个脚注"); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getHeader()"><!-- --></A><H3>
getHeader</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/Header.html" title="application.workbooks.workbook.documents.document.section 中的类">Header</A> <B>getHeader</B>()</PRE>
<DL>
<DD>返回当前章节的默认页眉(每一页的页眉都相同)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>Header类,即当前章节的默认页眉 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); Header header = section.getHeader(); header.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getHeader(int)"><CODE>getHeader(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getFooter()"><CODE>getFooter()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getFooter(int)"><CODE>getFooter(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/section/Header.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>Header</CODE></A></DL>
</DD>
</DL>
<HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -