Package: office
- Methods
- createWorkbook
- evaluateCell
- getCellBoolean
- getCellDate
- getCellDecimal
- getCellFormula
- getCellString
- getCellType
- getNoOfRows
- getNoOfSheets
- mergeCells
- open
- save
- setCellBoolean
- setCellDate
- setCellDecimal
- setCellFontBold
- setCellFontHeight
- setCellFontName
- setCellFormula
- setCellHorizontalAlignment
- setCellVerticalAlignment
- setColumnAutosize
- setColumnWidth
- setSheetTitle
- toCellName
- toColumnName
- update
On this page
- Methods
- createWorkbook
- evaluateCell
- getCellBoolean
- getCellDate
- getCellDecimal
- getCellFormula
- getCellString
- getCellType
- getNoOfRows
- getNoOfSheets
- mergeCells
- open
- save
- setCellBoolean
- setCellDate
- setCellDecimal
- setCellFontBold
- setCellFontHeight
- setCellFontName
- setCellFormula
- setCellHorizontalAlignment
- setCellVerticalAlignment
- setColumnAutosize
- setColumnWidth
- setSheetTitle
- toCellName
- toColumnName
- update
Excel 2007 and newer file manipulation.
Methods
createWorkbook
function createWorkbook(nrOfSheets as int) as workbook
Creates a new instance of workbook
with the specified number of sheets.
evaluateCell
function evaluateCell(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as string
getCellBoolean
function getCellBoolean(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as bool
getCellDate
function getCellDate(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as datetime
getCellDecimal
function getCellDecimal(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as decimal
getCellFormula
function getCellFormula(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as string
getCellString
function getCellString(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as string
getCellType
function getCellType(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as int
Returns the type of the cell, one of the following:
- CELL_TYPE_NUMERIC = 0
- CELL_TYPE_STRING = 1
- CELL_TYPE_FORMULA = 2
- CELL_TYPE_BLANK = 3
- CELL_TYPE_BOOLEAN = 4
- CELL_TYPE_ERROR = 5
getNoOfRows
function getNoOfRows(wb as workbook, sheetNo as int) as int
getNoOfSheets
function getNoOfSheets(wb as workbook) as int
mergeCells
method mergeCells(wb as workbook, sheetNo as int, firstRow as int, lastRow as int, firstCol as int, lastCol as int)
Since 1.6.0
open
function open(key as int) as workbook
Opens a workbook
from storage.
save
function save(wb as workbook, fileName as string) as int
Saves a workbook
to storage with the given name.
setCellBoolean
method setCellBoolean(wb as workbook, sheetNo as int, rowNo as int, colNo as int, value as bool)
setCellDate
method setCellDate(wb as workbook, sheetNo as int, rowNo as int, colNo as int, value as datetime)
setCellDecimal
method setCellDecimal(wb as workbook, sheetNo as int, rowNo as int, colNo as int, value as decimal)
setCellFontBold
method setCellFontBold(wb as workbook, sheetNo as int, rowNo as int, colNo as int)
Since 1.6.1
setCellFontHeight
method setCellFontHeight(wb as workbook, sheetNo as int, rowNo as int, colNo as int, fontHeight as int)
Since 1.6.1
setCellFontName
method setCellFontName(wb as workbook, sheetNo as int, rowNo as int, colNo as int, fontName as string)
Since 1.6.1
setCellFormula
method setCellFormula(wb as workbook, sheetNo as int, rowNo as int, colNo as int, formula as string)
setCellHorizontalAlignment
method setCellHorizontalAlignment(wb as workbook, sheetNo as int, rowNo as int, colNo as int, horizontalAlignment as int)
horizontalAlignment
can be one of the following:
- 0 = GENERAL - The horizontal alignment is general-aligned.
- 1 = LEFT - The horizontal alignment is left-aligned, even in Right-to-Left mode.
- 2 = CENTER - The horizontal alignment is centered, meaning the text is centered across the cell.
- 3 = RIGHT - The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell, even in Right-to-Left mode.
- 4 = FILL - Indicates that the value of the cell should be filled across the entire width of the cell.
- 5 = JUSTIFY - The horizontal alignment is justified (flush left and right).
- 6 = CENTER_SELECTION - The horizontal alignment is centered across multiple cells.
- 7 = DISTRIBUTED - Indicates that each ‘word’ in each line of text inside the cell is evenly distributed across the width of the cell, with flush right and left margins.
Since 1.6.1
setCellVerticalAlignment
method setCellVerticalAlignment(wb as workbook, sheetNo as int, rowNo as int, colNo as int, verticalAlignment as int)
verticalAlignment
can be one of the following:
- 0 = TOP - The vertical alignment is aligned-to-top.
- 1 = CENTER - The vertical alignment is centered across the height of the cell.
- 2 = BOTTOM - The vertical alignment is aligned-to-bottom. (typically the default value)
- 3 = JUSTIFY - When text direction is horizontal: the vertical alignment of lines of text is distributed vertically, where each line of text inside the cell is evenly distributed across the height of the cell, with flush top and bottom margins
- 4 = DISTRIBUTED - When text direction is horizontal: the vertical alignment of lines of text is distributed vertically, where each line of text inside the cell is evenly distributed across the height of the cell, with flush top.
Since 1.6.1
setColumnAutosize
method setColumnAutosize(wb as workbook, sheetNo as int, colNo as int)
Since 1.6.1
setColumnWidth
method setColumnWidth(wb as workbook, sheetNo as int, colNo as int, width as int)
Since 1.6.1
setSheetTitle
method setSheetTitle(wb as workbook, sheetNo as int, value as string)
Since 1.6.0
toCellName
function toCellName(rowNo as int, colNo as int) as string
toColumnName
function toColumnName(colNo as int) as string
update
function update(wb as workbook, fileName as string, key as int) as int
Updates a workbook
in storage with the given name.
These functions are now ordered alphabetically for easier reference.