public interface Spreadsheet extends WrappedResource
Modifier and Type | Field and Description |
---|---|
static int |
ErrorGeneral
General error code
|
static int |
OK
OK error status
|
Modifier and Type | Method and Description |
---|---|
void |
cancelEdit()
Cancels edit mode and leaves the contents of the active cell unchanged.
|
void |
clearBook()
Resets the book to the initial state - removes all sheets and creates new empty one.
|
default void |
clearRange(BaseDataType row,
BaseDataType column,
BaseDataType lastRow,
BaseDataType lastColumn,
BaseDataType clearType)
Clears the specified range in all selected sheets.
|
void |
clearRange(NumberType row,
NumberType column,
NumberType lastRow,
NumberType lastColumn,
NumberType clearType)
Clears the specified range in all selected sheets.
|
void |
copyRange(NumberType dstRow,
NumberType dstCol,
NumberType dstLastRow,
NumberType dstLastCol,
NumberType sourceView,
NumberType srcRow,
NumberType srcCol,
NumberType srcLastRow,
NumberType srcLastCol)
Copies a range of data to the specified location.
|
void |
deleteDefinedName(character name)
Deletes the specified user-defined name.
|
void |
deleteRange(NumberType row,
NumberType col,
NumberType lastRow,
NumberType lastCol,
NumberType shiftType)
Deletes cells, rows, or columns from the specified range.
|
void |
deleteSheets(NumberType index,
NumberType count)
Deletes the supplied sheets.
|
void |
editClear(NumberType clearType)
Clears all cells in the selected ranges.
|
void |
editCopy()
Copies the selected range or objects to the clipboard.
|
void |
editCopyDown()
Copies cells in the top row of a selection to the other rows in the selected range.
|
void |
editPaste()
Pastes the contents of the clipboard to the selected range.
|
void |
endBatch()
Disables batch mode.
|
integer |
endEdit()
Ends edit mode and applies changes to the active cell.
|
void |
filePrint(logical showPrintDlg)
Prints the selected worksheet.
|
void |
findDlg()
Displays the Find dialog.
|
void |
formatBorderDlg()
Displays the Border dialog box.
|
void |
formatFixed2()
Formats the selected ranges on all selected worksheets with fixed format and two decimal places.
|
void |
formatPatternDlg()
Displays the Pattern dialog box.
|
void |
getActiveCell(NumberType row,
NumberType col)
Returns the row and column coordinates of the active cell.
|
int64 |
getActiveColumn()
Determines the active column in the active worksheet.
|
int64 |
getActiveRow()
Determines the active row in the active worksheet.
|
void |
getBorder(NumberType left,
NumberType right,
NumberType top,
NumberType bottom,
NumberType shade,
NumberType colorLeft,
NumberType colorRight,
NumberType colorTop,
NumberType colorBottom)
Returns the border styles used to display cells.
|
character |
getClip()
Exports tab-delimited text strings from workbooks.
|
character |
getColText(NumberType column)
Returns the label for a column.
|
integer |
getColWidth(NumberType column)
Returns the width of a single column.
|
character |
getDefinedName(character name)
Returns the cell area reference string associated with a defined name.
|
character |
getEntry()
Returns the contents of the active cell in the first selected worksheet in the same format as it
would be displayed while in edit mode.
|
character |
getEntryRC(NumberType row,
NumberType col)
Returns the contents of the specified cell in the first selected worksheet in the same format as it
would be displayed while in edit mode.
|
character |
getEntrySRC(NumberType sheet,
NumberType row,
NumberType col)
Returns the contents of the specified cell on the specified worksheet in the same format as it
would be displayed while in edit mode.
|
int64 |
getFixedCol()
Returns the starting fixed column for the active worksheet.
|
int64 |
getFixedCols()
Returns how many columns to fix at the left of the active worksheet.
|
int64 |
getFixedRow()
Returns the starting fixed row for the active worksheet.
|
int64 |
getFixedRows()
Returns how many rows to fix at the top of the active worksheet.
|
character |
getFormattedText()
Returns the formatted text value of the active cell.
|
character |
getFormattedTextRC(NumberType row,
NumberType col)
Returns the formatted text value of the specified cell.
|
character |
getFormattedTextSRC(NumberType sheet,
NumberType row,
NumberType col)
Returns the formatted text value of the specified cell as it appears in the specified worksheet.
|
character |
getFormulaRC(NumberType row,
NumberType col)
Returns formula text of the specified cell in the active worksheet.
|
int64 |
getLastCol()
Returns the number of the last occupied column.
|
int64 |
getLastRow()
Returns the number of the last occupied row.
|
int64 |
getLeftCol()
Returns the leftmost column currently displayed in the view.
|
logical |
getLogicalRC(NumberType row,
NumberType col)
Returns the logical (True or False) value of the specified cell.
|
logical |
getLogicalSRC(NumberType sheet,
NumberType row,
NumberType col)
Returns the logical (True or False) value of the specified cell and sheet.
|
int64 |
getMaxCol()
Returns the last displayable column in the active worksheet.
|
int64 |
getMaxRow()
Returns the last displayable row in the active worksheet.
|
logical |
getModified()
Returns the state of the modified flag which indicates whether modifications have been made to a view.
|
decimal |
getNumber()
Returns the numeric value of the active cell.
|
character |
getNumberFormat()
Returns the number format for the active cell.
|
decimal |
getNumberRC(NumberType row,
NumberType col)
Returns the numeric value of the specified cell.
|
decimal |
getNumberSRC(NumberType sheet,
NumberType row,
NumberType col)
Returns the numeric value of the specified cell.
|
int64 |
getNumSheets()
Returns the number of worksheets in the current workbook.
|
character |
getObjItems(NumberType id)
Returns a semicolon-delimited list of items from a list box object.
|
character |
getObjName(NumberType id)
Returns the name of the specified object.
|
character |
getObjText(NumberType id)
Returns the text displayed by a specific button or check box object.
|
integer |
getObjValue(NumberType id)
Returns the value of a check box or list box object.
|
logical |
getObjVisible(NumberType id)
Returns whether an object is visible.
|
void |
getPattern(NumberType pattern,
NumberType fgColor,
NumberType bgColor)
Returns the pattern for the active cell.
|
character |
getPrintArea()
Returns the current print area.
|
decimal |
getPrintBottomMargin()
Returns the bottom page margin used during printing.
|
logical |
getPrintLandscape()
Returns whether a workbook is printed with a portrait or landscape orientation.
|
decimal |
getPrintLeftMargin()
Returns the left page margin used during printing.
|
decimal |
getPrintRightMargin()
Returns the right page margin used during printing.
|
decimal |
getPrintTopMargin()
Returns the top page margin used during printing.
|
void |
getProtection(logical locked,
logical hidden)
Returns the protection status of the active cell.
|
void |
getSelection(NumberType selection,
NumberType row1,
NumberType col1,
NumberType row2,
NumberType col2)
Returns the row and column coordinates of the currently selected range.
|
integer |
getSelectionCount()
Returns the number of selected ranges.
|
int64 |
getSheet()
Returns the active worksheet.
|
character |
getSheetName(NumberType sheet)
This property returns the name of the specified worksheet.
|
integer |
getShowSelections()
Returns whether selections are displayed.
|
character |
getText()
Returns the text value of the active cell in the active worksheet.
|
character |
getTextRC(NumberType row,
NumberType col)
Returns the text value of the specified cell in the active worksheet.
|
character |
getTextSRC(NumberType sheet,
NumberType row,
NumberType col)
Returns the text value of the specified cell in the specified worksheet.
|
int64 |
getTopRow()
Returns the topmost row currently displayed in the view.
|
integer |
getType()
Returns the cell type of the active cell.
|
integer |
getTypeRC(NumberType row,
NumberType col)
Returns the cell type of the specified cell.
|
integer |
getTypeSRC(NumberType sheet,
NumberType row,
NumberType col)
Returns the cell type of the specified cell of the specified sheet.
|
void |
insertRange(NumberType row,
NumberType col,
NumberType lastRow,
NumberType lastCol,
NumberType shiftType)
Moves the specified range in order to insert new cells, rows, or columns.
|
logical |
isAllowDelete()
Returns whether the delete key clears selections.
|
logical |
isAllowEditHeaders()
Returns whether column headers can be edited.
|
logical |
isAllowInCellEditing()
Returns whether in-cell editing is allowed.
|
logical |
isAllowMoveRange()
Returns whether you can move ranges by dragging them.
|
logical |
isAllowResize()
Returns whether you can resize rows and columns by dragging them.
|
logical |
isAutoRecalc()
Returns whether automatic recalculation is enabled.
|
logical |
isCanEditPaste()
Returns whether the internal clipboard contain items that can be pasted to the worksheet.
|
logical |
isColHidden(NumberType column)
Returns the display status of an individual column.
|
logical |
isEnableProtection()
Returns whether protection is enabled for all selected sheets.
|
logical |
isEnterMovesDown()
Returns whether pressing the ENTER key moves the active cell down to the next cell.
|
logical |
isRowHidden(NumberType row)
Returns the display status of an individual row.
|
logical |
isScrollToLastRC()
Returns how scrollbars work.
|
logical |
isShowColHeading()
Returns whether column headings are displayed.
|
logical |
isShowEditBar()
Sets whether the edit bar is displayed.
|
logical |
isShowRowHeading()
Returns whether row headings are displayed.
|
logical |
isShowZeroValues()
Returns whether zero value cells are displayed.
|
void |
objGetCell(NumberType id,
NumberType hasCell,
NumberType row,
NumberType col)
Returns the worksheet cell assigned to hold the value displayed by the specified check box or list
box object.
|
int64 |
objNameToID(character name)
Returns the object identification number for an object specified by name.
|
void |
objNew(NumberType type,
NumberType x1,
NumberType y1,
NumberType x2,
NumberType y2,
NumberType id)
Creates and adds an object to the active worksheet.
|
void |
objSetPos(NumberType id,
NumberType x1,
NumberType y1,
NumberType x2,
NumberType y2)
Sets the position and size of an object.
|
void |
read(character filePath,
NumberType fileType)
Reads a worksheet or workbook from a file.
|
void |
recalc()
Recalculates the workbook attached to a view.
|
void |
setActiveCell(NumberType row,
NumberType col)
Makes the specified cell the active cell.
|
void |
setActiveColumn(NumberType value)
Sets the active column in the active worksheet.
|
void |
setActiveRow(NumberType value)
Sets the active row in the active worksheet.
|
default void |
setAlignment(BaseDataType hAlign,
BaseDataType wordWrap,
BaseDataType vAlign,
BaseDataType orientation)
Changes the data alignment information for the currently selected cells.
|
void |
setAlignment(NumberType hAlign,
logical wordWrap,
NumberType vAlign,
NumberType orientation)
Changes the data alignment information for the currently selected cells.
|
void |
setAllowDelete(logical value)
Sets whether the delete key clears selections.
|
void |
setAllowEditHeaders(logical value)
Sets whether column headers can be edited by the user.
|
void |
setAllowInCellEditing(logical value)
Sets whether in-cell editing is allowed.
|
void |
setAllowMoveRange(logical value)
Sets whether you can move ranges by dragging them.
|
void |
setAllowResize(logical value)
Sets whether you can resize rows and columns by dragging them.
|
void |
setAutoRecalc(logical value)
Sets whether automatic recalculation is enabled.
|
void |
setBackColor(NumberType value)
Sets the background color of the view.
|
void |
setBorder(NumberType outline,
NumberType left,
NumberType right,
NumberType top,
NumberType bottom,
NumberType shade,
NumberType colorOutline,
NumberType colorLeft,
NumberType colorRight,
NumberType colorTop,
NumberType colorBottom)
Sets the border styles used to display cells in all selected sheets.
|
void |
setClip(character value)
Imports tab-delimited text strings to workbooks.
|
void |
setColHidden(NumberType column,
logical value)
Sets or returns the display status of an individual column.
|
void |
setColText(NumberType column,
character text)
Sets the label for a column.
|
void |
setColWidth(NumberType column,
NumberType width)
Sets the width of a single column.
|
void |
setColWidth(NumberType firstColumn,
NumberType lastColumn,
NumberType width,
logical defaultColumnWidth)
Sets the width of multiple columns.
|
void |
setColWidthAuto(NumberType row1,
NumberType col1,
NumberType row2,
NumberType col2,
logical setDefaults)
Sets the widths of the specified columns to automatically adjust to the largest column entry,
including the header.
|
void |
setColWidthTwips(NumberType firstColumn,
NumberType lastColumn,
NumberType width,
logical defaultColumnWidth)
Changes the width of one or more columns to the specified number of twips.
|
void |
setDefaultFont(character font,
NumberType size)
Sets the default font and font size.
|
void |
setDefinedName(character name,
character areaRef)
Associates a name with an area reference.
|
void |
setEnableProtection(logical value)
Sets whether protection is enabled for all selected sheets.
|
void |
setEnterMovesDown(logical value)
Sets whether pressing the ENTER key moves the active cell down to the next cell.
|
void |
setEntry(character value)
Enters text in the active cell of all selected worksheets.
|
default void |
setEntryRC(BaseDataType row,
BaseDataType col,
BaseDataType value)
Enters number in the specified cell of all selected worksheets.
|
void |
setEntryRC(NumberType row,
NumberType col,
character value)
Enters text in the specified cell of all selected worksheets.
|
void |
setEntrySRC(NumberType sheet,
NumberType row,
NumberType col,
character value)
Enters text in the specified cell on the specified worksheet.
|
void |
setExtraColor(NumberType value)
Sets the background color of the view outside the workbook.
|
void |
setFixedCols(NumberType value)
Sets how many columns to fix at the left of the active worksheet.
|
void |
setFixedRows(NumberType value)
Sets how many rows to fix at the top of the active worksheet.
|
void |
setFont(character font,
NumberType size,
logical bold,
logical italic,
logical underline,
logical strikeout,
NumberType color,
logical outline,
logical shadow)
Sets font information for all selected cells.
|
void |
setFontSize(NumberType value)
Sets the font size for the selected ranges.
|
default void |
setFormulaRC(BaseDataType row,
BaseDataType col,
BaseDataType value)
Enters formula text in the specified cell of all selected sheets.
|
void |
setFormulaRC(NumberType row,
NumberType col,
character value)
Enters formula text in the specified cell of all selected sheets.
|
void |
setLeftCol(NumberType value)
Sets the leftmost column currently displayed in the view.
|
void |
setLogicalRC(NumberType row,
NumberType col,
logical value)
Sets the logical (True or False) value of the specified cell.
|
void |
setLogicalSRC(NumberType sheet,
NumberType row,
NumberType col,
logical value)
Sets the logical (True or False) value of the specified cell and sheet.
|
void |
setMaxCol(NumberType value)
Sets the last displayable column in a the active worksheet.
|
void |
setMaxRow(NumberType value)
Sets the last displayable row in a the active worksheet.
|
void |
setModified(logical value)
Sets the state of the modified flag which indicates whether modifications have been made to a view.
|
void |
setNumber(NumberType value)
Sets the numeric value of the active cell.
|
void |
setNumberFormat(character format)
Sets or returns the number format for the active cell in all selected sheets.
|
void |
setNumberRC(NumberType row,
NumberType col,
NumberType value)
Sets the numeric value of the specified cell.
|
void |
setNumberSRC(NumberType sheet,
NumberType row,
NumberType col,
NumberType value)
Sets the numeric value of the specified cell.
|
void |
setNumSheets(NumberType value)
Sets the number of worksheets in the current workbook.
|
void |
setObjItems(NumberType id,
character items)
Assigns a list of values, a semicolon-delimited list of items, to a list box object.
|
void |
setObjName(NumberType id,
character name)
Sets the name of the specified object.
|
void |
setObjText(NumberType id,
character text)
Sets the text of the displayed by a specific button or check box object.
|
default void |
setObjValue(NumberType id,
BaseDataType value)
Sets the value of a check box or list box object.
|
void |
setObjValue(NumberType id,
NumberType value)
Sets the value of a check box or list box object.
|
void |
setObjVisible(NumberType id,
logical value)
Sets whether an object is visible.
|
void |
setPattern(NumberType pattern,
NumberType fgColor,
NumberType bgColor)
Sets the pattern for all selected cells and objects in all selected sheets.
|
void |
setPrintArea(character formula)
Sets the current print area.
|
void |
setPrintBottomMargin(NumberType value)
Sets the bottom page margin used during printing.
|
void |
setPrintFooter(character value)
Sets the current page footer.
|
void |
setPrintHeader(character value)
Sets the current page header.
|
void |
setPrintLandscape(logical value)
Sets whether a workbook is printed with a portrait or landscape orientation.
|
void |
setPrintLeftMargin(NumberType value)
Sets the left page margin used during printing.
|
void |
setPrintRightMargin(NumberType value)
Sets the right page margin used during printing.
|
void |
setPrintTopMargin(NumberType value)
Sets the top page margin used during printing.
|
void |
setProtection(logical locked,
logical hidden)
Sets the protection status of all selected cells in all selected sheets.
|
void |
setRowHeight(NumberType firstRow,
NumberType lastRow,
NumberType height,
logical defaultRowHeight)
Changes the height of one or more rows to the specified number of twips.
|
void |
setRowHidden(NumberType row,
logical value)
Sets or returns the display status of an individual row.
|
void |
setScrollToLastRC(logical value)
Sets how scrollbars work.
|
void |
setSelection(NumberType row1,
NumberType col1,
NumberType row2,
NumberType col2)
Selects the specified range and moves the active cell to the top left cell in the range.
|
default void |
setSheet(BaseDataType value)
Sets the active worksheet.
|
void |
setSheet(NumberType value)
Sets the active worksheet.
|
void |
setSheetName(NumberType sheet,
character name)
Assigns a name to a worksheet.
|
void |
setShowColHeading(logical value)
Sets whether column headings are displayed.
|
void |
setShowEditBar(logical value)
Returns whether the edit bar is displayed.
|
void |
setShowGridLines(logical value)
Sets or returns whether grid lines are displayed.
|
void |
setShowRowHeading(logical value)
Sets whether row headings are displayed.
|
void |
setShowSelections(NumberType value)
Sets whether selections are displayed.
|
void |
setShowTabs(NumberType value)
Sets or returns the display status and position of the sheet name tabs on a workbook.
|
void |
setShowZeroValues(logical value)
Sets whether zero value cells are displayed.
|
void |
setText(character value)
Enters text in the active cell of all selected sheets.
|
void |
setTextRC(NumberType row,
NumberType col,
character value)
Enters text in the specified cell of all selected sheets.
|
default void |
setTextSRC(BaseDataType sheet,
BaseDataType row,
BaseDataType col,
BaseDataType value)
Enters text in the specified cell of the specified sheet.
|
void |
setTextSRC(NumberType sheet,
NumberType row,
NumberType col,
character value)
Enters text in the specified cell of the specified sheet.
|
void |
setTopRow(NumberType value)
Sets the topmost row currently displayed in the view.
|
void |
setType(NumberType value)
Sets the cell type of the active cell.
|
void |
setTypeRC(NumberType row,
NumberType col,
NumberType value)
Sets the cell type of the specified cell.
|
void |
setTypeSRC(NumberType sheet,
NumberType row,
NumberType col,
NumberType value)
Sets the cell type of the specified cell in the specified sheet.
|
void |
showActiveCell()
Positions the view to show the active cell if it is not currently displayed in the window.
|
void |
sort3(NumberType row1,
NumberType col1,
NumberType row2,
NumberType col2,
logical sortByRows,
NumberType key1,
NumberType key2,
NumberType key3)
Specifies a range of data to be sorted and as many as three keys by which to sort the data.
|
void |
startBatch()
Enables batch mode.
|
void |
startEdit(logical clear,
logical inCellEditFocus,
logical arrowsExitEditMode)
Begins edit mode for the active cell.
|
void |
write(character fileName,
NumberType format)
Saves the workbook to the specified file.
|
id, id, unknown, valid
static final int OK
static final int ErrorGeneral
logical isAllowDelete()
If this property is True, the delete key deletes the current selection. If this property is False, the delete key does not clear selections. By default, the allow delete flag is True.
void setAllowDelete(logical value)
If this property is True, the delete key deletes the current selection. If this property is False, the delete key does not clear selections. By default, the allow delete flag is True.
value
- The value to set.logical isAllowEditHeaders()
void setAllowEditHeaders(logical value)
value
- The value to set.logical isAllowInCellEditing()
void setAllowInCellEditing(logical value)
value
- The value to set.logical isAllowMoveRange()
void setAllowMoveRange(logical value)
value
- The value to set.logical isAllowResize()
void setAllowResize(logical value)
value
- The value to set.logical isAutoRecalc()
void setAutoRecalc(logical value)
value
- The value to set.void setBackColor(NumberType value)
RGB-VALUE
.value
- The value to set.void setExtraColor(NumberType value)
RGB-VALUE
.value
- The value to set.void startEdit(logical clear, logical inCellEditFocus, logical arrowsExitEditMode)
clear
- If True, the edit bar is cleared as edit mode commences.inCellEditFocus
- If True, editing focus is given to in-cell editing; if False, editing focus is given to the
edit bar.arrowsExitEditMode
- Sets the arrows exit edit mode flag. If True, edit mode is exited if you press an arrow key
on the keyboard.void cancelEdit()
CancelEdit aborts cell editing and exits edit mode without altering the contents of the active cell.
logical isCanEditPaste()
If this property returns True, there is data available to paste. This is a read-only property.
void clearBook()
void clearRange(NumberType row, NumberType column, NumberType lastRow, NumberType lastColumn, NumberType clearType)
If nRow1 is -1, all rows are included in the range; if nCol1 is -1, all columns are included.
row
- Coordinate that specifies the range to clear. See above. If -1, all rows are included in the
range.column
- Coordinate that specifies the range to clear. See above. If -1, all columns are included in the
range.lastRow
- Coordinate that specifies the range to clear. See above.lastColumn
- Coordinate that specifies the range to clear. See above.clearType
- Determines what is cleared from the specified range:
The following table lists the valid constants:
Constant Description
0 Not supported.
1 All (values and formats).
2 Formats only.
3 Values only (including formulas).default void clearRange(BaseDataType row, BaseDataType column, BaseDataType lastRow, BaseDataType lastColumn, BaseDataType clearType)
If nRow1 is -1, all rows are included in the range; if nCol1 is -1, all columns are included.
row
- Coordinate that specifies the range to clear. See above. If -1, all rows are included in the
range.column
- Coordinate that specifies the range to clear. See above. If -1, all columns are included in the
range.lastRow
- Coordinate that specifies the range to clear. See above.lastColumn
- Coordinate that specifies the range to clear. See above.clearType
- Determines what is cleared from the specified range:
The following table lists the valid constants:
Constant Description
0 Not supported.
1 All (values and formats).
2 Formats only.
3 Values only (including formulas).character getClip()
The Clip property can set or obtain a tab-delimited text block in a workbook. When obtaining a block of text from a worksheet, it is obtained from the currently selected range. If multiple ranges are selected, only text from the first range is used.
void setClip(character value)
The Clip property can set or obtain a tab-delimited text block in a workbook. When placing a block of text in a worksheet, text placement begins with the active cell. Tab characters (ANSI character 9) in the text block move text placement to the next column; carriage returns (ANSI character 13), line feeds (ANSI character 10), and carriage return/line feed pairs move text placement to the following row.
value
- The value to set.int64 getActiveColumn()
The active cell is the cell on which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing. The Col property is used with the Row property to set the active cell in the worksheet.
void setActiveColumn(NumberType value)
The active cell is the cell on which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing. The Col property is used with the Row property to set the active cell in the worksheet.
value
- Identifies a 1-based column number.logical isColHidden(NumberType column)
column
- 1-based column number.void setColHidden(NumberType column, logical value)
column
- 1-based column number.value
- True, the column is hidden. If it is False, the column is displayed.integer getColWidth(NumberType column)
column
- Identifies a column by number.void setColWidth(NumberType column, NumberType width)
column
- Identifies a column by number.width
- Indicates the column width value.void setColWidth(NumberType firstColumn, NumberType lastColumn, NumberType width, logical defaultColumnWidth)
firstColumn
- Identifies the first column.lastColumn
- Identifies the last column.width
- Indicates the column width value.defaultColumnWidth
- Specifies whether the default column width is changed. True specifies that the default
width is set to nWidth, and the specified columns are set to the default width.void setColWidthAuto(NumberType row1, NumberType col1, NumberType row2, NumberType col2, logical setDefaults)
row1
- Specifies the first row of the range containing the columns for which to set the width.col1
- Specifies the first column of the range containing the columns for which to set the width.row2
- Specifies the last row of the range containing the columns for which to set the width.col2
- Specifies the last column of the range containing the columns for which to set the width.setDefaults
- This parameter is not supported.void setColWidthTwips(NumberType firstColumn, NumberType lastColumn, NumberType width, logical defaultColumnWidth)
firstColumn
- Identifies the first column.lastColumn
- Identifies the last column.width
- Indicates the column width in twips.defaultColumnWidth
- Specifies whether the default column width is changed. True specifies that the default
width is set to width, and the specified columns are set to the default width.void setRowHeight(NumberType firstRow, NumberType lastRow, NumberType height, logical defaultRowHeight)
firstRow
- Identifies the first row.lastRow
- Identifies the last row.height
- Indicates the row height in twips.defaultRowHeight
- Specifies whether the default row height is changed. True specifies that the default
height is set to height, and the specified columns are set to the default height.character getColText(NumberType column)
column
- Identifies a column by number.void setColText(NumberType column, character text)
column
- Identifies a column by number.text
- The column label text.character getDefinedName(character name)
name
- An existing defined name associated with an area reference.void setDefinedName(character name, character areaRef)
name
- A unique name will create new association, an existing name will change the existing one.areaRef
- Area reference string, $B$10:$F$10 for example.void deleteDefinedName(character name)
name
- Identifies the user-defined name to delete.void editClear(NumberType clearType)
clearType
- Determines what is cleared from the specified range:
The following table lists the valid constants:
Constant Description
0 Not supported.
1 All (values and formats).
2 Formats only.
3 Values only (including formulas).void editCopy()
void editCopyDown()
EditCopyDown copies data in the top row of a selection to the other rows in the selection and adjusts relative cell references appropriately.
void editPaste()
EditPaste pastes information from the clipboard to the selected range in the active worksheet. How the information is pasted in the worksheet depends on the size of the selected range. If the selected range consists of a single cell, all information in the clipboard is pasted to the worksheet. If the selected range is smaller than the clipboard information, only as much information as will fit in the range is pasted. If the selected range is larger than the clipboard information, the clipboard information is replicated to fill the range.
logical isEnableProtection()
If this property is True, protection is enabled. Enabling protection means that any cells marked as hidden or locked are actually hidden and locked.
void setEnableProtection(logical value)
If this property is True, protection is enabled. Enabling protection means that any cells marked as hidden or locked are actually hidden and locked.
value
- The value to set.integer endEdit()
EndEdit ends cell editing and applies any changes made during edit mode to the active cell. If an
invalid entry has been made (e.g., an incorrect formula), edit mode cannot end. In this case,
ErrorGeneral
is returned.
logical isEnterMovesDown()
If this property is True, pressing the ENTER key moves the active cell down to the next row, even if no range is selected. If False and a single cell is selected, pressing the ENTER key does not advance the active cell. When you create a new workbook, this property is True by default.
void setEnterMovesDown(logical value)
If this property is True, pressing the ENTER key moves the active cell down to the next row, even if no range is selected. If False and a single cell is selected, pressing the ENTER key does not advance the active cell. When you create a new workbook, this property is True by default.
value
- The value to set.character getEntry()
The text returned by this property is in the same format as if you were entering or editing the cell's value. If the cell contains a formula, the text of the formula is returned. Formulas are returned preceded by an equal sign (=).
void setEntry(character value)
value
- The value to set.character getEntryRC(NumberType row, NumberType col)
The text returned by this property is in the same format as if you were entering or editing the cell's value. If the cell contains a formula, the text of the formula is returned. Formulas are returned preceded by an equal sign (=).
row
- 1-based row number.col
- 1-based column number.void setEntryRC(NumberType row, NumberType col, character value)
row
- 1-based row number.col
- 1-based column number.value
- The value to set.default void setEntryRC(BaseDataType row, BaseDataType col, BaseDataType value)
row
- 1-based row number.col
- 1-based column number.value
- The value to set.character getEntrySRC(NumberType sheet, NumberType row, NumberType col)
The text returned by this property is in the same format as if you were entering or editing the cell's value. If the cell contains a formula, the text of the formula is returned. Formulas are returned preceded by an equal sign (=).
sheet
- 1-based sheet number.row
- 1-based row number.col
- 1-based column number.void setEntrySRC(NumberType sheet, NumberType row, NumberType col, character value)
sheet
- 1-based sheet number.row
- 1-based row number.col
- 1-based column number.value
- The value to set.void filePrint(logical showPrintDlg)
showPrintDlg
- Sets the show print dialog flag. If this flag is True, the Print dialog box is displayed
before printing. The Print dialog box allows the user to set printing parameters such as
the page range and number of copies to print.void findDlg()
int64 getFixedRow()
int64 getFixedRows()
void setFixedRows(NumberType value)
value
- The value to set.int64 getFixedCol()
int64 getFixedCols()
void setFixedCols(NumberType value)
value
- The value to set.void formatFixed2()
void formatBorderDlg()
void formatPatternDlg()
character getFormattedText()
character getFormattedTextRC(NumberType row, NumberType col)
row
- 1-based row number of the cell from which the text is returned.col
- 1-based column number of the cell from which the text is returned.character getFormattedTextSRC(NumberType sheet, NumberType row, NumberType col)
sheet
- 1-based number of the sheet from which the text is returned.row
- 1-based row number of the cell from which the text is returned.col
- 1-based column number of the cell from which the text is returned.void insertRange(NumberType row, NumberType col, NumberType lastRow, NumberType lastCol, NumberType shiftType)
row
- First row.col
- First column.lastRow
- Last row.lastCol
- Last column.shiftType
- Determine how the insert should occur.
Value Meaning ----- ------- 1 Cells of the specified range are shifted right to make room for the inserted cells. 2 Cells of the specified range are shifted down to make room for the inserted cells. 3 Rows in which the specified range resides are shifted down to make room for the inserted cells. 4 Columns in which the specified range resides are shifted right to make room for the inserted cells.
void copyRange(NumberType dstRow, NumberType dstCol, NumberType dstLastRow, NumberType dstLastCol, NumberType sourceView, NumberType srcRow, NumberType srcCol, NumberType srcLastRow, NumberType srcLastCol)
dstRow
- First row of the destination range.dstCol
- First column of the destination range.dstLastRow
- Last row of the destination range.dstLastCol
- Last column of the destination range.sourceView
- Ignored.srcRow
- First row of the source range.srcCol
- First column of the source range.srcLastRow
- Last row of the source range.srcLastCol
- Last column of the source range.void deleteRange(NumberType row, NumberType col, NumberType lastRow, NumberType lastCol, NumberType shiftType)
row
- First row.col
- First column.lastRow
- Last row.lastCol
- Last column.shiftType
- Determine how the delete should occur.
Value Meaning ----- ------- 1 Cells to the right of the range are shifted left to fill the vacated space. 2 Cells below the range are shifted up to fill the vacated space. 3 Rows in which the range resides are deleted and lower rows are shifted up to fill the vacated space. 4 Columns in which the range resides are deleted and the rightmost columns are shifted left to fill the vacated space.
void getActiveCell(NumberType row, NumberType col)
The active cell is the cell on which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing.
row
- The passed in argument will receive the 1-based row number of the active cell.col
- The passed in argument will receive the 1-based column number of the active cell.void getProtection(logical locked, logical hidden)
After locking cells and hiding formulas, you must enable protection for the workbook before cell locking and formula hiding is enabled. Protection for a workbook is enabled using the EnableProtection property.
locked
- The passed in argument will receive the status of the locked cell flag. If the locked cell
flag is True, the active cell is locked.hidden
- The passed in argument will receive the status of the hide formulas flag. If the hide
formulas flag is True, the formulas are hidden (formula results are not hidden).void getSelection(NumberType selection, NumberType row1, NumberType col1, NumberType row2, NumberType col2)
selection
- Identifies the index of the selection. An index of 0 returns the row and column coordinates
of the first selection. Only first selection is supported (value of 0).row1
- The passed in argument will be assigned the 1-based row number of the selection start.col1
- The passed in argument will be assigned the 1-based column number of the selection start.row2
- The passed in argument will be assigned the 1-based row number of the selection end.col2
- The passed in argument will be assigned the 1-based column number of the selection end.integer getSelectionCount()
int64 getLastCol()
int64 getLastRow()
int64 getTopRow()
void setTopRow(NumberType value)
value
- The new value to assign.int64 getLeftCol()
void setLeftCol(NumberType value)
value
- The new value to assign.logical getLogicalRC(NumberType row, NumberType col)
If the cell contains a number, its logical value is True for nonzero values, and False for zero values. If the cell has text that can be converted to a number, the text is converted and treated as a numeric cell. If the cell contains a formula, the above rules apply depending on the formula's result. All other cells, including empty cells, have a False logical value. The text "True" and "False" are returned as True and False, respectively.
row
- 1-based row number that identifies a cell.col
- 1-based column number that identifies a cell.void setLogicalRC(NumberType row, NumberType col, logical value)
If the cell contains a number, its logical value is True for nonzero values, and False for zero values. If the cell has text that can be converted to a number, the text is converted and treated as a numeric cell. If the cell contains a formula, the above rules apply depending on the formula's result. All other cells, including empty cells, have a False logical value. The text "True" and "False" are returned as True and False, respectively. If the cell contains a formula, the formula is deleted when the logical value is assigned.
row
- 1-based row number that identifies a cell.col
- 1-based column number that identifies a cell.value
- Indicates the specified cell's logical value.logical getLogicalSRC(NumberType sheet, NumberType row, NumberType col)
If the cell contains a number, its logical value is True for nonzero values, and False for zero values. If the cell has text that can be converted to a number, the text is converted and treated as a numeric cell. If the cell contains a formula, the above rules apply depending on the formula's result. All other cells, including empty cells, have a False logical value. The text "True" and "False" are returned as True and False, respectively.
sheet
- 1-based number that identifies a sheet.row
- 1-based row number that identifies a cell.col
- 1-based column number that identifies a cell.void setLogicalSRC(NumberType sheet, NumberType row, NumberType col, logical value)
If the cell contains a number, its logical value is True for nonzero values, and False for zero values. If the cell has text that can be converted to a number, the text is converted and treated as a numeric cell. If the cell contains a formula, the above rules apply depending on the formula's result. All other cells, including empty cells, have a False logical value. The text "True" and "False" are returned as True and False, respectively. If the cell contains a formula, the formula is deleted when the logical value is assigned.
sheet
- 1-based number that identifies a sheet.row
- 1-based row number that identifies a cell.col
- 1-based column number that identifies a cell.value
- Indicates the specified cell's logical value.int64 getMaxCol()
void setMaxCol(NumberType value)
value
- 1-based number of the last displayable column.int64 getMaxRow()
void setMaxRow(NumberType value)
value
- 1-based number of the last displayable row.logical getModified()
The value of this property indicates whether modifications have been made. When a new view is created the Modified property is set to False. When something in the view is changed, Modified is set to True and the Modified event is fired. If further changes are made, the Modified event is not fired again. It will not be fired again until you set this property to False.
To cause the Modified event to be fired every time a change is made to the workbook, set the modified flag to False from within the Modified event.
void setModified(logical value)
The value of this property indicates whether modifications have been made. When a new view is created the Modified property is set to False. When something in the view is changed, Modified is set to True and the Modified event is fired. If further changes are made, the Modified event is not fired again. It will not be fired again until you set this property to False. Setting Modified to True only sets it for the specified view, setting it to False sets it to False for all views attached to a table.
To cause the Modified event to be fired every time a change is made to the workbook, set the modified flag to False from within the Modified event.
value
- The value to set.decimal getNumber()
When returning the value, cells containing a formula return the numeric result of the formula. If the cell contains text, an attempt is made to convert the text to a number. If the text cannot be converted, 0 (No Error) is returned.
void setNumber(NumberType value)
value
- The cell value to set.decimal getNumberRC(NumberType row, NumberType col)
When returning the value, cells containing a formula return the numeric result of the formula. If the cell contains text, an attempt is made to convert the text to a number. If the text cannot be converted, 0 (No Error) is returned.
row
- 1-based row number that identifies the cell.col
- 1-based column number that identifies the cell.void setNumberRC(NumberType row, NumberType col, NumberType value)
row
- 1-based row number that identifies the cell.col
- 1-based column number that identifies the cell.value
- The cell value to set.decimal getNumberSRC(NumberType sheet, NumberType row, NumberType col)
When returning the value, cells containing a formula return the numeric result of the formula. If the cell contains text, an attempt is made to convert the text to a number. If the text cannot be converted, 0 (No Error) is returned.
sheet
- 1-based number that identifies a sheet.row
- 1-based row number that identifies the cell.col
- 1-based column number that identifies the cell.void setNumberSRC(NumberType sheet, NumberType row, NumberType col, NumberType value)
sheet
- 1-based number that identifies a sheet.row
- 1-based row number that identifies the cell.col
- 1-based column number that identifies the cell.value
- The cell value to set.character getNumberFormat()
void setNumberFormat(character format)
format
- The number format string.int64 getNumSheets()
void setNumSheets(NumberType value)
Set NumSheets to change the number of worksheets in the workbook. Worksheets are added to or deleted from the end of the current list of worksheets.
To add worksheets between existing worksheets, use InsertSheets. To delete worksheets between existing worksheets, use DeleteSheets.
value
- The new number of sheets.void deleteSheets(NumberType index, NumberType count)
index
- 1-based index of the first sheet to delete.count
- The number of sheets to delete.void objGetCell(NumberType id, NumberType hasCell, NumberType row, NumberType col)
id
- Identification number of the object.hasCell
- The returned state of the object cell flag. The parameter is not supported and the passed in
argument will be ignored.row
- Upon return, the argument will be assigned 1-based row number that identifies the cell in
which the object value is placed.col
- Upon return, the argument will be assigned 1-based column number that identifies the cell in
which the object value is placed.character getObjName(NumberType id)
id
- Identification number of the object.void setObjName(NumberType id, character name)
id
- Identification number of the object.name
- Object name.int64 objNameToID(character name)
name
- Object name.void objNew(NumberType type, NumberType x1, NumberType y1, NumberType x2, NumberType y2, NumberType id)
type
- Identifies the type of object to create.
The supported object types:
Type Description
7 Button
9 Check-box
10 Combo-boxx1
- The coordinate that represents the first anchor point of the object. It is measured in columns
from the left edge of the worksheet.y1
- The coordinate that represents the first anchor point of the object. It is measured in rows
from the top edge of the worksheet.x2
- The coordinate that represents the second anchor point of the object. It is measured in columns
from the left edge of the worksheet.y2
- The coordinate that represents the second anchor point of the object. It is measured in rows
from the top edge of the worksheet.id
- Upon return will be assigned the identification number of the new object.logical getObjVisible(NumberType id)
id
- Object identification number.void setObjVisible(NumberType id, logical value)
true
, the specified object is displayed.id
- Object identification number.void objSetPos(NumberType id, NumberType x1, NumberType y1, NumberType x2, NumberType y2)
id
- Identification number of the object to position.x1
- X-coordinate that represent the first anchor point of the object. It is measured in columns
from the left edge of the worksheet.y1
- Y-coordinate that represent the first anchor point of the object. It is measured in rows
from the left edge of the worksheet.x2
- Not implemented.y2
- Not implemented.character getObjText(NumberType id)
id
- Identification number of the object.void setObjText(NumberType id, character text)
id
- Identification number of the object.text
- Object text.integer getObjValue(NumberType id)
For check box objects 0 is unchecked and 1 is checked. For list box objects -1 means no item is displayed, 0 means the first item is displayed, 1 means the second item is displayed, and so on.
id
- Identification number of the object.void setObjValue(NumberType id, NumberType value)
For check box objects 0 is unchecked and 1 is checked. For list box objects -1 means no item is displayed, 0 means the first item is displayed, 1 means the second item is displayed, and so on.
id
- Identification number of the object.value
- Object value.default void setObjValue(NumberType id, BaseDataType value)
For check box objects 0 is unchecked and 1 is checked. For list box objects -1 means no item is displayed, 0 means the first item is displayed, 1 means the second item is displayed, and so on.
id
- Identification number of the object.value
- Object value.character getObjItems(NumberType id)
id
- Identification number of the object.void setObjItems(NumberType id, character items)
id
- Identification number of the object.items
- Semicolon-delimited list of items.void read(character filePath, NumberType fileType)
Read initializes a workbook structure and reads a worksheet from the specified file. If there is not a workbook attached to the view, a new workbook is created.
filePath
- Path of the file to read.fileType
- The type of the read file. Currently not supported.void recalc()
int64 getActiveRow()
The active cell is the cell on which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing. The Col property is used with the Row property to set the active cell in the worksheet.
void setActiveRow(NumberType value)
The active cell is the cell on which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing. The Col property is used with the Row property to set the active cell in the worksheet.
value
- Identifies a 1-based row number.logical isRowHidden(NumberType row)
row
- 1-based row number.void setRowHidden(NumberType row, logical value)
row
- 1-based row number.value
- True, the row is hidden. If it is False, the row is displayed.logical isScrollToLastRC()
Normally scroll bars can scroll the last filled cell to the top-left edge of the window. If ScrollToLastRC is set to False, it causes scrolling to stop when the last filled row and column reach the bottom-right edge of the screen. The last row and column can still be set to the top-left edge of the window by setting the TopRow or LeftCol property to the appropriate value.
void setScrollToLastRC(logical value)
Normally scroll bars can scroll the last filled cell to the top-left edge of the window. If ScrollToLastRC is set to False, it causes scrolling to stop when the last filled row and column reach the bottom-right edge of the screen. The last row and column can still be set to the top-left edge of the window by setting the TopRow or LeftCol property to the appropriate value.
value
- The new scroll value.void setActiveCell(NumberType row, NumberType col)
The active cell is the cell on which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing.
The active cell is highlighted by a heavy border. If you use SetActiveCell to change the active cell to another cell in the same selection, only the active cell changes, the selection is not lost.
row
- Indicates the number of the row that contains the cell you want to make active.col
- Indicates the number of the column that contains the cell you want to make active.void setPattern(NumberType pattern, NumberType fgColor, NumberType bgColor)
pattern
- Indicates the pattern number used to display the cells or objects.
The supported patterns are:
0... no pattern
1... solid fillfgColor
- The foreground color. Use rgb-value
function to encode the color value.bgColor
- The background color. Use rgb-value
function to encode the color value.void setProtection(logical locked, logical hidden)
The method only supports locking, the hidden parameter is ignored.
locked
- Sets the locked cell flag. If the locked cell flag is True, the active cell is locked. This
is the default setting.hidden
- Sets the hide formulas flag. If the hide formulas flag is True, the formulas are hidden
(formula results are not hidden).void setSelection(NumberType row1, NumberType col1, NumberType row2, NumberType col2)
row1
- Identifies the top-left row coordinate you want to select.col1
- Identifies the top-left column coordinate you want to select.row2
- Identifies the bottom-right row coordinate you want to select.col2
- Identifies the bottom-right column coordinate you want to select.integer getShowSelections()
void setShowSelections(NumberType value)
value
- The only accepted value is 1, meaning all selections are displayed at all times.int64 getSheet()
void setSheet(NumberType value)
value
- Index number that identifies an existing worksheet within the workbook attached to the
view. Worksheets are indexed from left to right beginning with 1. Do not confuse the index with
the sheet name that appears on the sheet tab.default void setSheet(BaseDataType value)
value
- Index number that identifies an existing worksheet within the workbook attached to the
view. Worksheets are indexed from left to right beginning with 1. Do not confuse the index with
the sheet name that appears on the sheet tab.character getSheetName(NumberType sheet)
sheet
- Index number that identifies an existing worksheet within the workbook attached to the
view. Worksheets are indexed from left to right beginning with 1. Do not confuse the index with
the sheet name that appears on the sheet tab.void setSheetName(NumberType sheet, character name)
sheet
- Index number that identifies an existing worksheet within the workbook attached to the
view. Worksheets are indexed from left to right beginning with 1. Do not confuse the index with
the sheet name that appears on the sheet tab.name
- Name associated with the identified sheet.void showActiveCell()
logical isShowEditBar()
If this property is True, the edit bar is displayed with the workbook. The edit bar does not appear until the container makes it UI active (provides a window for it). For example, scroll bars do not appear in Visual Basic design mode, but they do in edit mode and run mode.
void setShowEditBar(logical value)
If this property is True, the edit bar is displayed with the workbook. The edit bar does not appear until the container makes it UI active (provides a window for it). For example, scroll bars do not appear in Visual Basic design mode, but they do in edit mode and run mode.
value
- The new value.logical isShowZeroValues()
If this property is True, cells with zero values are displayed. If False, zero value cells are displayed as blanks.
void setShowZeroValues(logical value)
If this property is True, cells with zero values are displayed. If False, zero value cells are displayed as blanks.
value
- The new value.logical isShowColHeading()
void setShowColHeading(logical value)
value
- The new state.logical isShowRowHeading()
void setShowRowHeading(logical value)
value
- The new state.void setShowGridLines(logical value)
value
- If true
, grid lines are displayed.void setShowTabs(NumberType value)
value
- Controls the display of the sheet name tabs. Following are the valid values:
Value Description
----------------------------------------------------------
0 Tabs are not displayed.
1 Tabs are displayed along the bottom of the workbook.void sort3(NumberType row1, NumberType col1, NumberType row2, NumberType col2, logical sortByRows, NumberType key1, NumberType key2, NumberType key3)
If the data is sorted by rows, each row of data in the specified range is considered a record and sorted together. If data is sorted by columns, each column in the specified range is considered a record. When defining sort keys, specify the number of the row or column in the selected range that is to serve as a key. Use a positive number to define an ascending key; use a negative number to define a descending key. For example, to specify the second column in the selected range as a primary descending key, enter -2 for key1. To sort on one key, key2 must be zero. To sort on two keys, key3 must be zero.
row1
- Specifies the range of data to be sorted.col1
- Specifies the range of data to be sorted.row2
- Specifies the range of data to be sorted.col2
- Specifies the range of data to be sorted.sortByRows
- Specifies how data is sorted. If True, data is sorted by rows; if False, data is sorted by
columns.key1
- Sort key.key2
- Sort key.key3
- Sort key.character getText()
Text returns the current text value of the active cell. If the cell contains a formula, the variable contains the result of the formula.
void setText(character value)
Set Text to place text into the active cell. If the active cell contains a formula, the formula is deleted when the text is placed in the cell.
value
- Text value.character getTextRC(NumberType row, NumberType col)
Text returns the current text value of the specified cell. If the cell contains a formula, the variable contains the result of the formula.
row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.void setTextRC(NumberType row, NumberType col, character value)
Set Text to place text into the specified cell. If the specified cell contains a formula, the formula is deleted when the text is placed in the cell.
row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.value
- Text value.character getTextSRC(NumberType sheet, NumberType row, NumberType col)
Text returns the current text value of the specified cell. If the cell contains a formula, the variable contains the result of the formula.
sheet
- Sheet number.row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.void setTextSRC(NumberType sheet, NumberType row, NumberType col, character value)
Set Text to place text into the specified cell. If the specified cell contains a formula, the formula is deleted when the text is placed in the cell.
sheet
- Sheet number.row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.value
- Text value.default void setTextSRC(BaseDataType sheet, BaseDataType row, BaseDataType col, BaseDataType value)
Set Text to place text into the specified cell. If the specified cell contains a formula, the formula is deleted when the text is placed in the cell.
sheet
- Sheet number.row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.value
- Text value.character getFormulaRC(NumberType row, NumberType col)
row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.void setFormulaRC(NumberType row, NumberType col, character value)
row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.value
- Formula text value.default void setFormulaRC(BaseDataType row, BaseDataType col, BaseDataType value)
row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.value
- Formula text value.integer getType()
Following are all valid types: 0 Empty 1 Number -1 Formula returning number 2 Text -2 Formula returning text 3 Logical -3 Formula returning logical 4 Error -4 Formula returning error
void setType(NumberType value)
Following are all valid types: 0 Empty 1 Number -1 Formula returning number 2 Text -2 Formula returning text 3 Logical -3 Formula returning logical 4 Error -4 Formula returning error
value
- Cell type.integer getTypeRC(NumberType row, NumberType col)
Following are all valid types: 0 Empty 1 Number -1 Formula returning number 2 Text -2 Formula returning text 3 Logical -3 Formula returning logical 4 Error -4 Formula returning error
row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.void setTypeRC(NumberType row, NumberType col, NumberType value)
Following are all valid types: 0 Empty 1 Number -1 Formula returning number 2 Text -2 Formula returning text 3 Logical -3 Formula returning logical 4 Error -4 Formula returning error
row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.value
- Cell type.integer getTypeSRC(NumberType sheet, NumberType row, NumberType col)
Following are all valid types: 0 Empty 1 Number -1 Formula returning number 2 Text -2 Formula returning text 3 Logical -3 Formula returning logical 4 Error -4 Formula returning error
sheet
- Sheet number.row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.void setTypeSRC(NumberType sheet, NumberType row, NumberType col, NumberType value)
Following are all valid types: 0 Empty 1 Number -1 Formula returning number 2 Text -2 Formula returning text 3 Logical -3 Formula returning logical 4 Error -4 Formula returning error
sheet
- Sheet number.row
- Row number of the cell that identifies the specific cell.col
- Column number of the cell that identifies the specific cell.value
- Cell type.void setFont(character font, NumberType size, logical bold, logical italic, logical underline, logical strikeout, NumberType color, logical outline, logical shadow)
font
- The font name.size
- You can specify the font size in points or twips. When specifying size in points, use a
positive number; use a negative number when specifying twips. When you specify twips, this
method uses the absolute value of the number you provide for size.bold
- Bold font attribute.italic
- Italic font attribute.underline
- Underlined font attribute.strikeout
- Striked out font attribute.color
- Font color. Use the value returned by RGB-VALUE
.outline
- Not implemented.shadow
- Not implemented.void setDefaultFont(character font, NumberType size)
font
- The font name.size
- You can specify the font size in points or twips. When specifying size in points, use a
positive number; use a negative number when specifying twips. When you specify twips, this
method uses the absolute value of the number you provide for size.void setFontSize(NumberType value)
value
- The font point size to use for the selected ranges.void getBorder(NumberType left, NumberType right, NumberType top, NumberType bottom, NumberType shade, NumberType colorLeft, NumberType colorRight, NumberType colorTop, NumberType colorBottom)
The possible values for the border type parameters: Value Description ----------------------- 0 No Border 1 Thin Line 2 Medium Line 3 Dashed Line 4 Dotted Line 5 Thick Line 6 Double Line 7 Hairline
The returned color values are in the format of the legacy method RGB-VALUE
.
left
- Receives the border type for a side of the active cell.right
- Receives the border type for a side of the active cell.top
- Receives the border type for a side of the active cell.bottom
- Receives the border type for a side of the active cell.shade
- Not implemented, the parameter is ignored.colorLeft
- Receives the value that specify the color of the cell border side.colorRight
- Receives the value that specify the color of the cell border side.colorTop
- Receives the value that specify the color of the cell border side.colorBottom
- Receives the value that specify the color of the cell border side.void setBorder(NumberType outline, NumberType left, NumberType right, NumberType top, NumberType bottom, NumberType shade, NumberType colorOutline, NumberType colorLeft, NumberType colorRight, NumberType colorTop, NumberType colorBottom)
outline
- Indicates the outline border for the selected range. This border type is assigned to the
top edge of cells in the top row, the left edge of cells in the left column, the right edge
of cells in the right column, and the bottom edge of cells in the bottom row.
The valid values are:
Value Description
-1 No Change
0 No Border
1 Thin Line
2 Medium Line
3 Dashed Line
4 Dotted Line
5 Thick Line
6 Double Line
7 Hairlineleft
- Indicates the border type for a side of the active cell. See outline above for valid values.right
- Indicates the border type for a side of the active cell. See outline above for valid values.top
- Indicates the border type for a side of the active cell. See outline above for valid values.bottom
- Indicates the border type for a side of the active cell. See outline above for valid values.shade
- Not implemented, the parameter is ignored.colorOutline
- Indicates the color of the cell border outline.colorLeft
- Indicates the color of the cell border sides.colorRight
- Indicates the color of the cell border sides.colorTop
- Indicates the color of the cell border sides.colorBottom
- Indicates the color of the cell border sides.void getPattern(NumberType pattern, NumberType fgColor, NumberType bgColor)
pattern
- Receives the returned pattern number used to display the cells or objects. The pattern
number can range from 0 (no pattern) to 18 and represents one of the 18 possible patterns.fgColor
- Receives the pattern foreground color.bgColor
- Receives the pattern background color.decimal getPrintLeftMargin()
void setPrintLeftMargin(NumberType value)
value
- Indicates the left margin value in inches.decimal getPrintRightMargin()
void setPrintRightMargin(NumberType value)
value
- Indicates the left margin value in inches.decimal getPrintTopMargin()
void setPrintTopMargin(NumberType value)
value
- Indicates the left margin value in inches.decimal getPrintBottomMargin()
void setPrintBottomMargin(NumberType value)
value
- Indicates the left margin value in inches.void setAlignment(NumberType hAlign, logical wordWrap, NumberType vAlign, NumberType orientation)
hAlign
- Indicates the horizontal alignment. Following are the valid constants:
Value Description
-------------------
1 General
2 Left
3 Center
4 Right
5 Fill
6 Justify
7 Center across cellswordWrap
- Indicates the value of the word wrap flag. If the flag is True, text wraps when it exceeds
the cell width.vAlign
- Indicates the vertical alignment. Following are the valid constants:
Value Description
-------------------
1 Top
2 Center
3 Bottomorientation
- Indicates the orientation. This feature is not implemented and the parameter is ignored.default void setAlignment(BaseDataType hAlign, BaseDataType wordWrap, BaseDataType vAlign, BaseDataType orientation)
hAlign
- Indicates the horizontal alignment. Following are the valid constants:
Value Description
-------------------
1 General
2 Left
3 Center
4 Right
5 Fill
6 Justify
7 Center across cellswordWrap
- Indicates the value of the word wrap flag. If the flag is True, text wraps when it exceeds
the cell width.vAlign
- Indicates the vertical alignment. Following are the valid constants:
Value Description
-------------------
1 Top
2 Center
3 Bottomorientation
- Indicates the orientation. This feature is not implemented and the parameter is ignored.void setPrintHeader(character value)
value
- The new value.void setPrintFooter(character value)
value
- The new value.character getPrintArea()
This name defines the worksheet ranges to be printed. This property returns a string containing a formula for the Print_Area user-defined name.
The print area formula can contain one or more ranges (e.g. A1:C3,A11:C13). If "Print_Area" is (""), the selected portion of the active worksheet is printed.
void setPrintArea(character formula)
Set this property to change the Print_Area user-defined name to the formula pointed to by formula. This name defines the worksheet ranges to be printed.
The print area formula can contain one or more ranges (e.g. A1:C3,A11:C13). If "Print_Area" is Null (""), the selected portion of the active worksheet is printed. Set print areas as absolute ranges, i .e. $A$1:$J$30. If you set the print area to a relative range (based on the active cell), an unexpected print result will occur.
formula
- Print area.logical getPrintLandscape()
If this property is True, the workbook is printed with a landscape orientation. If this property is False, the workbook is printed with a portrait orientation.
void setPrintLandscape(logical value)
If this property is True, the workbook is printed with a landscape orientation. If this property is False, the workbook is printed with a portrait orientation.
value
- New landscape value.void write(character fileName, NumberType format)
fileName
- Name of the file to write.format
- The parameter is ignored.void startBatch()
All the changes made through the Spreadsheet legacy API will be queued and
committed to the Spreadsheet backend only after endBatch()
method is called.
Note that during batch mode no legacy Spreadsheet events are triggered. Also legacy method return values are undefined.
void endBatch()
All the queued changes made through the Spreadsheet legacy API are committed to the Spreadsheet backend.