Resolver One Library Documentation

Back to documentation index page.

Functions

GetExternalCell

def GetExternalCell(filepath, sheet, col, row, relativeTo=<Optional parameter>):

The GetExternalCell function retrieves the values of cells in Excel files. It returns the value as an ExternalCell object.

Calls to this function are generated when you use a reference to an Excel file in a formula, or you can call the function directly in user code.

filepath is the path to the Excel file. This can be absolute or relative.

sheet is the name of the worksheet in the Excel file.

col is the column reference of the desired cell in integer format.

row is the row number of the desired cell.

relativeTo is an optional parameter which specifies how a relative filepath should be interpreted. If this is a directory, then a relative filepath is interpreted relative to this directory. If it is a file, then a relative filepath is interpreted from the directory containing the file. If relativeTo refers to a file or directory that doesn't exist it is treated as a file.

The code generated for external references in formulae uses relativeTo to ensure that relative paths in external references are relative to the location of the .rsl file. For example, a formula in C:\My Files\Resolver One Files\MySheet.rsl that refers to ..\Excel Files\Book1.xls will look in C:\My Files\Excel Files\Book1.xls.

Classes

Class ExternalCell

class ExternalCell(object):
    def __init__(self, value):

The ExternalCell class represents a cell retrieved from an external source such as Excel. It is returned by GetExternalCell.

It is not intended that you should create new ExternalCell instances yourself.

Properties

Value

Value = property(get)

A get only property containing the value of the external cell. The type of the returned value will be the same as if the contents had been typed directly into a cell.