com.acesoft.aceoffix.excelwriter
Class Table

java.lang.Object
  extended by com.acesoft.aceoffix.excelwriter.Table

public class Table
extends java.lang.Object

Table class represents the Excel table object defined in Aceoffix.

In Excel worksheet, we can define any range of cells containing a contiguous block of cells as a Table object. Table class encapsulates a series of data operations implementing in the continuous range of cells based on data table. Table class simplifies the complex operations to the ranges of Excel cells. And developer can work in the range of Excel cells as simple as in data table. Therefore, development efficiency and code stability are improved.

You can use Table object not only to fill data into a specified range of cells, but also to draw a new table on a blank range.

You can only call the Sheet.openTable(String) method to get the Table object.

Version:
5.0
Author:
Acesoft Corporation

Method Summary
 void close()
          Closes the current Table.
 Border getBorder()
          Gets the border object of the Table.
 DataFieldCollection getDataFields()
          Gets a collection of DataFields of the current record.
 Font getFont()
          Gets the font object.
 java.lang.String getRangeAddress()
          Gets the range address of the Table.
 void merge()
          Creates a merged cell from the current Table.
 void merge(boolean across)
          Creates a merged cell form the current Table or merges all columns in the Table into one column.
 void nextRow()
          Moves to the next record row in the Table.
 void setBackColor(java.awt.Color value)
          Sets the back color of the Table.
 void setColumnWidth(double value)
          Sets the width of all columns in the Table.
 void setForeColor(java.awt.Color value)
          Sets the fore color of the Table.
 void setHorizontalAlignment(XlHAlign value)
          Sets the horizontal alignment of the table.
 void setNumberFormatLocal(java.lang.String value)
          Sets data display format of the table.
 void setReadOnly(boolean value)
          Sets a value that indicates whether the Table is read-only.
 void setRowHeight(double value)
          Sets the height of all the rows in the Table, measured in points.
 void setVerticalAlignment(XlVAlign value)
          Sets the vertical alignment of the table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRangeAddress

public java.lang.String getRangeAddress()
                                 throws java.io.IOException
Gets the range address of the Table. For example:"A1:F5".

It is the specified RangeAddress when you open the current Table.

Throws:
java.io.IOException

getDataFields

public DataFieldCollection getDataFields()
                                  throws java.lang.Exception
Gets a collection of DataFields of the current record.

Throws:
java.lang.Exception
See Also:
Sheet.openTable() to learn how to call the getDataFields method.

getBorder

public Border getBorder()
                 throws java.io.IOException
Gets the border object of the Table.

Throws:
java.io.IOException
See Also:
Sheet.openTable() to learn how to get the border object of the Table in code example 2.

setBackColor

public void setBackColor(java.awt.Color value)
                  throws java.io.IOException
Sets the back color of the Table.

Throws:
java.io.IOException
See Also:
Sheet.openTable() to learn how to set the back color of the Table in code example 2.

setForeColor

public void setForeColor(java.awt.Color value)
                  throws java.io.IOException
Sets the fore color of the Table.

Throws:
java.io.IOException
See Also:
Sheet.openTable() to learn how to set the fore color of the Table in code example 2.

setRowHeight

public void setRowHeight(double value)
                  throws java.io.IOException
Sets the height of all the rows in the Table, measured in points.

Throws:
java.io.IOException
See Also:
Sheet.openTable() to learn how to set the row height of the Table in code example 2.

setColumnWidth

public void setColumnWidth(double value)
                    throws java.io.IOException
Sets the width of all columns in the Table.

One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used.

Throws:
java.io.IOException
See Also:
Sheet.openTable() to learn how to set the column width of the Table in code example 2.

setReadOnly

public void setReadOnly(boolean value)
                 throws java.io.IOException
Sets a value that indicates whether the Table is read-only.

If the value is true, the editable Table will be read-only. And if the value is false, the read-only Table will be editable.

Note: Only when OpenMode is Aceoffix.OpenModeType.xlsSubmitForm, the ReadOnly property is valid.

The default value is false.

Throws:
java.io.IOException

getFont

public Font getFont()
Gets the font object.


setHorizontalAlignment

public void setHorizontalAlignment(XlHAlign value)
                            throws java.io.IOException
Sets the horizontal alignment of the table.

Throws:
java.io.IOException

setVerticalAlignment

public void setVerticalAlignment(XlVAlign value)
                          throws java.io.IOException
Sets the vertical alignment of the table.

Throws:
java.io.IOException

setNumberFormatLocal

public void setNumberFormatLocal(java.lang.String value)
                          throws java.io.IOException
Sets data display format of the table.

Throws:
java.io.IOException

nextRow

public void nextRow()
             throws java.lang.Exception,
                    java.io.IOException
Moves to the next record row in the Table.

Throws:
java.lang.Exception
java.io.IOException
See Also:
Sheet.openTable().

close

public void close()
           throws java.lang.Exception,
                  java.io.IOException
Closes the current Table.

When all the operations of current Table are done, you must call the Close method to close the Table. Once the Table is closed, you cannot refer it again unless you reopen it.

Throws:
java.lang.Exception
java.io.IOException
See Also:
Sheet.openTable().

merge

public void merge()
           throws java.lang.Exception,
                  java.io.IOException
Creates a merged cell from the current Table.

The value of a merged cell is specified by the cell in the upper-left corner of the Table.

Throws:
java.lang.Exception
java.io.IOException
See Also:
Sheet.openTable() in code example 2.

merge

public void merge(boolean across)
           throws java.lang.Exception,
                  java.io.IOException
Creates a merged cell form the current Table or merges all columns in the Table into one column.

Parameters:
across - true to merge cells in each row of the Table as separate merged cells. The default value is false.
Throws:
java.lang.Exception
java.io.IOException