next up previous contents index
Next: B.4 Classes Up: B. Perl API Previous: B.2 Utility classes   Contents   Index

Subsections

B.3 Global functions

These functions are not part of any class.

B.3.1 init

init(pLicenseFile);
Initialize SpreadScript.

Parameters:
pLicenseFile - the SpreadScript license file
Returns:
none

B.3.2 getVersionInfo

getVersionInfo();
Gets the version information for SpreadScript.

Parameters:
none
Returns:
a string containing the version information

B.3.3 stopOnExcelWarning

stopOnExcelWarning(stopOnExcelWarning);
Determines whether warnings generated when reading or writing Excel files are only printed to standard error or throw exceptions. The features of Excel that are not supported by SpreadScript are normally reported (by default) as exceptions. However, if you know that the unsupported features are not required for the files you are using, you may wish to change this setting to false so that the warnings are only printed. Carefully check the results to make sure that data integrity is not adversely affected.

Parameters:
stopOnExcelWarning - when set to false, warnings generated when reading or writing Excel files are printed to standard error; when true, the warnings throw an exception (the default is true)
Returns:
none

B.3.4 setDefaultExcelMode

setDefaultExcelMode(useExcelMode);
Sets the global default to use Excel compatibility mode with all newly created Workbook objects. Turning on Excel compatibility mode results in the range syntax using : (e.g., A1:B3) rather than .. (e.g., A1..B3) to specify ranges. Also, the Excel-compatible functions that are normally prefixed with XL, such as XLCHOOSE, are not prefixed with XL. When dealing with Excel files, this mode is best.

Parameters:
useExcelMode - if true, Excel compatibility mode is turned on
Returns:
none

B.3.5 getTypeString

getTypeString(type);
Converts a cell type constant to a string.

Parameters:
type - the cell type to convert to a string
Returns:
cell type as a string: ``Empty'', ``Overflow'', ``Number'', ``Text'', ``Formula'', ``Chart''

B.3.6 getActiveWorkbook

getActiveWorkbook();
Retrieves a reference to the currently active Workbook. Set the active Workbook using Workbook.activate().

Parameters:
none
Returns:
the active Workbook

B.3.7 textToRC

textToRC(pText);
Converts from a cell name to two integers representing a row and column. For example, textToRC(``A1'') results in (1, 1).

Parameters:
pText - the text cell name to convert
Returns:
a two-element list/array containing the row and column

B.3.8 rcToText

rcToText(row,column);
Converts two integers representing a row and column to cell name. For example, rcToText(1, 1) returns ``A1''.

Parameters:
row - the row
column - the column
Returns:
the text cell name


next up previous contents index
Next: B.4 Classes Up: B. Perl API Previous: B.2 Utility classes   Contents   Index
SpreadScript User's Guide, Version 1.2
Grey Trout Software
02 March 2003