|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acesoft.aceoffix.ExcelResTableRange
public class ExcelResTableRange
Represents a TableRange. Fills data into TableRange and controls behavior of TableRange.
In Excel worksheet, developer can define any range of cells containing one contiguous block of cells as a TableRange object. You should use TableRange object if you want to operate a range of cells or access a data set.
You can use ExcelResTableRange object not only to fill data into a specified range of cells, but also to draw a new table on an empty range. You can only use the ExcelResSheet.openTableRange method to obtain a ExcelResTableRange object.
Method Summary | |
---|---|
void |
close()
Closes the current TableRange. |
ExcelResBorder |
getBorder()
Gets the border object of the TableRange. |
DataFieldResCollection |
getDataFields()
Returns a collection of DataField objects of the current record. |
java.lang.String |
getRangeAddress()
Gets the range address of the TableRange. |
void |
merge()
Creates a merged cell from the TableRange. |
void |
merge(boolean across)
Creates a merged cell from the TableRange. |
void |
nextRow()
Closes the current record row and Moves to the next record row in the TableRange. |
void |
setBackColor(java.awt.Color value)
Sets the back color of the TableRange. |
void |
setColumnWidth(double value)
Sets the width of all the columns in the TableRange. |
void |
setForeColor(java.awt.Color value)
Sets the fore color of the TableRange. |
void |
setReadOnly(boolean value)
Sets a value that indicates whether the TableRange is read-only. |
void |
setRowHeight(double value)
Sets the height of all the rows in the TableRange, measured in points. |
void |
setSubmitName(java.lang.String value)
Sets the SubmitName of the TableRange. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String getRangeAddress() throws java.io.IOException
java.io.IOException
public DataFieldResCollection getDataFields() throws java.lang.Exception
java.lang.Exception
public ExcelResBorder getBorder() throws java.io.IOException
java.io.IOException
public void setBackColor(java.awt.Color value) throws java.io.IOException
java.io.IOException
public void setForeColor(java.awt.Color value) throws java.io.IOException
java.io.IOException
public void setRowHeight(double value) throws java.io.IOException
java.io.IOException
public void setColumnWidth(double value) throws java.io.IOException
java.io.IOException
public void setReadOnly(boolean value) throws java.io.IOException
If the value is true, the editable TableRange will be read-only. And if the value is false, the read-only TableRange will be editable. Only when OpenMode is OpenModeType.xlsSubmitForm, the ReadOnly property is valid.
java.io.IOException
public void setSubmitName(java.lang.String value) throws java.lang.Exception, java.io.IOException
If you do not want to get values of the TableRange when saving document, you can ignore the SubmitName property. If you assign the SubmitName property, it means that the values of the TableRange should be submitted. When saving document, you must use the SubmitName as the parameter of ExcelReqSheet.openTableRange method to get the values of this TableRange. When SubmitName is defined and OpenMode is OpenModeType.xlsSubmitForm, the TableRange will automatically be editable. If you want the TableRange to be read-only, you should assign true to the ReadOnly property of this TableRange object.
The following code example shows how to mark a table to be submitted.
ExcelResponse er = new ExcelResponse(); ExcelResSheet sheet1 = er.openSheet("sheet1"); sheet1.openCell("C2").setSubmitName("CompanyName"); // This cell will be submitted. sheet1.openTableRange("B6:F10").setSubmitName("SalesInfo");// This table will be submitted. aceCtrl1.setServerPage("../aceserver.do"); //Required aceCtrl1.setSaveDataPage("savedata.jsp"); aceCtrl1.bind(er); aceCtrl1.openDocument("doc/test.xls", OpenModeType.xlsSubmitForm, "Jack"); aceCtrl1.setTagId("AceoffixCtrl1"); //Required
value
- The SubmitName is a name for submitting and is defined by developer. It will be used as the parameter of the ExcelReqSheet.openTableRange method.
Typically, you can use a data table name as the SubmitName. The SubmitName must be unique in one worksheet. The default value is an empty string which means this TableRange will not be submitted.
The SubmitName is case-sensitive.
java.lang.Exception
java.io.IOException
public void nextRow() throws java.lang.Exception, java.io.IOException
java.lang.Exception
java.io.IOException
public void close() throws java.lang.Exception, java.io.IOException
java.lang.Exception
java.io.IOException
public void merge() throws java.lang.Exception, java.io.IOException
java.lang.Exception
java.io.IOException
public void merge(boolean across) throws java.lang.Exception, java.io.IOException
across
- true to merge cells in each row of the TableRange as separate merged cells. The default value is false.
java.lang.Exception
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |