Kodall
Packages

Package: office

Excel 2007 and newer file manipulation.

Excel 2007 and newer file manipulation.

Methods

createWorkbook

ONE Workflow
function createWorkbook(nrOfSheets as int) as workbook

Creates a new instance of workbook with the specified number of sheets.

evaluateCell

ONE Workflow
function evaluateCell(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as string

getCellBoolean

ONE Workflow
function getCellBoolean(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as bool

getCellDate

ONE Workflow
function getCellDate(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as datetime

getCellDecimal

ONE Workflow
function getCellDecimal(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as decimal

getCellFormula

ONE Workflow
function getCellFormula(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as string

getCellString

ONE Workflow
function getCellString(wb as workbook, sheetNo as int, rowNo as int, cellNo as int) as string

getCellType

ONE Workflow
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

ONE Workflow
function getNoOfRows(wb as workbook, sheetNo as int) as int

getNoOfSheets

ONE Workflow
function getNoOfSheets(wb as workbook) as int

mergeCells

ONE Workflow
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

ONE Workflow
function open(key as int) as workbook

Opens a workbook from storage.

save

ONE Workflow
function save(wb as workbook, fileName as string) as int

Saves a workbook to storage with the given name.

setCellBoolean

ONE Workflow
method setCellBoolean(wb as workbook, sheetNo as int, rowNo as int, colNo as int, value as bool)

setCellDate

ONE Workflow
method setCellDate(wb as workbook, sheetNo as int, rowNo as int, colNo as int, value as datetime)

setCellDecimal

ONE Workflow
method setCellDecimal(wb as workbook, sheetNo as int, rowNo as int, colNo as int, value as decimal)

setCellFontBold

ONE Workflow
method setCellFontBold(wb as workbook, sheetNo as int, rowNo as int, colNo as int)

Since 1.6.1

setCellFontHeight

ONE Workflow
method setCellFontHeight(wb as workbook, sheetNo as int, rowNo as int, colNo as int, fontHeight as int)

Since 1.6.1

setCellFontName

ONE Workflow
method setCellFontName(wb as workbook, sheetNo as int, rowNo as int, colNo as int, fontName as string)

Since 1.6.1

setCellFormula

ONE Workflow
method setCellFormula(wb as workbook, sheetNo as int, rowNo as int, colNo as int, formula as string)

setCellHorizontalAlignment

ONE Workflow
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

ONE Workflow
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

ONE Workflow
method setColumnAutosize(wb as workbook, sheetNo as int, colNo as int)

Since 1.6.1

setColumnWidth

ONE Workflow
method setColumnWidth(wb as workbook, sheetNo as int, colNo as int, width as int)

Since 1.6.1

setSheetTitle

ONE Workflow
method setSheetTitle(wb as workbook, sheetNo as int, value as string)

Since 1.6.0

toCellName

ONE Workflow
function toCellName(rowNo as int, colNo as int) as string

toColumnName

ONE Workflow
function toColumnName(colNo as int) as string

update

ONE Workflow
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.