|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acesoft.aceoffix.ExcelResCell
public class ExcelResCell
Represents a cell. Fills data into cell and controls behavior of cell. You can only use the ExcelResSheet.openCell or ExcelResSheet.openCellRC method to obtain a ExcelResCell object.
Method Summary | |
---|---|
void |
setBackColor(java.awt.Color value)
Sets the back color of the cell. |
void |
setForeColor(java.awt.Color value)
Sets the fore color of the cell. |
void |
setFormula(java.lang.String value)
Sets the formula of the cell. |
void |
setReadOnly(boolean value)
Sets a value that indicates whether the cell is read-only. |
void |
setSubmitName(java.lang.String value)
Sets the SubmitName of the cell. |
void |
setValue(java.lang.String value)
Sets the value of the cell. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setValue(java.lang.String value) throws java.io.IOException
java.io.IOException
public void setFormula(java.lang.String value) 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 setReadOnly(boolean value) throws java.io.IOException
If the value is true, the editable cell will be read-only. And if the value is false, the read-only cell 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 value of the cell when saving document, you can ignore the SubmitName property. If you assign the SubmitName property, it means that the value of the cell should be submitted. When saving document, you must use the SubmitName as the parameter of ExcelReqSheet.openCell method to get the value of this cell. When SubmitName is defined and OpenMode is OpenModeType.xlsSubmitForm, the cell will automatically be editable. If you want the cell to be read-only, you should assign true to the ReadOnly property of this cell.
The following code example shows how to mark cells to be submitted.
ExcelResponse er = new ExcelResponse(); ExcelResSheet sheet1 = er.openSheet("sheet1"); sheet1.openCell("C1").setValue("Hello world."); // This cell will not be submitted. sheet1.openCell("C2").setValue(""); // Initializes the value of cell. sheet1.openCell("C2").setSubmitName("CompanyName"); // This cell will be submitted. sheet1.openCell("D2").setSubmitName("ProductName"); // This cell will be submitted. sheet1.openCellRC(2, 5).setSubmitName("ProductCode"); // This cell 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.openCell method.
Typically, you can use a data field name as the SubmitName. The SubmitName must be unique in one worksheet. The default value is an empty string which means this cell will not be submitted.
The SubmitName is case-sensitive.
java.lang.Exception
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |