Blue Prism - VBO Excel PDF
Blue Prism - VBO Excel PDF
Blue Prism - VBO Excel PDF
about:blank 06/24/2020
MS Excel VBO Page 2 of 26
Exceptions: - Invalid Input Parameter : If the worksheet name parameter is given - Bad
Handle : If the handle does not correspond to an Excel instance
1.3 Attach
Back-compatible link to 'Open Instance'. This opens the first running instance of Excel found
and links to it in this object. Returns: - handle : Number : An integer with which the instance
opened can be identified. - Enable Events : Flag : Indicates that events should be enabled /
disabled on the attached instance - defaulted to True
about:blank 06/24/2020
MS Excel VBO Page 3 of 26
Back compatible link to 'Open instance' - attaches to the excel instance containing the
current workbook. Note that if the instance containing the workbook could not be found, a
new instance will be created. Params: - File name : Text : The name of the file in the
instance that should be opened. - Enable Events : Flag : Indicates that events should be
enabled / disabled on the attached instance - defaulted to True Returns: - handle : Number :
The integer that can be used to reference this instance later.
Preconditions:
Closes all instances of excel which have been opened by this business object, either
through "Create Instance" or "Open Instance" and which have not been discarded through
"Close Instance" or "Release Instance"
Preconditions:
about:blank 06/24/2020
MS Excel VBO Page 4 of 26
Closes the instance represented by the given handle, saving the changes or not as
specified. Params: - handle : Number : The handle identifying the instance that should be
closed; The default of 0 will close the 'current active' instance - ie. the last one accessed.
Note that following the 'current active' instance being closed, the current instance will not be
set. - Save Changes : Flag : True to save the instance's workbooks before closing; False to
just close the instance. Exceptions: - Bad Handle : If the given handle did not correspond to
an instance.
Preconditions:
1.9 Copy
about:blank 06/24/2020
MS Excel VBO Page 5 of 26
Handle In Number
Workbook In Text
about:blank 06/24/2020
MS Excel VBO Page 6 of 26
1.14 Cut
1.15 Delete
about:blank 06/24/2020
MS Excel VBO Page 7 of 26
Deletes the specified worksheet from the workbook. Params: - handle : Number : The excel
instance handle - Workbook Name : Text : The name of the workbook - Worksheet Name :
Text : The name of the sheet to delete. If the sheet doesn't exist, this will fail silently - ie.
nothing will occur. Exceptions: - Bad Handle : If the given handle did not correspond to an
instance. - Workbook Not Found : If the given workbook did not exist on the specified
instance. - Worksheet Not Found : If the named worksheet did not exist on the specified
workbook, or if the active sheet was specified and there was no active sheet.
1.17 Exit
Here for backward compatibility - exits the current instance of Excel without saving any
changes.
Searches for the next empty cell in the direction given. This can either activate that cell
before returning, or just return the cell reference while leaving the active cell as it was.
Params: - handle : Number : The integer handle identifying the Excel instance to use. The
default of zero indicates the 'current' instance. - Direction : Text : The direction in which to
go, this should start with "U", "D", "L" or "R" (not case-sensitive) - the rest of the string is
ignored, so you can use "Up", "DOWN" "left" and, indeed, "r" - Activate Cell? : Flag : True to
activate the found cell, False to just return the reference. Default is False. Returns: - Cell
Reference : Text : The cell ID which represents the next empty cell in the required direction.
This will be blank if no empty cell was found in the given direction. Exceptions: Invalid
Direction Parameter : If the given direction parameter was invalid - ie. did not start with one
of the (case-insensitive) letters "U", "D", "L" or "R".
about:blank 06/24/2020
MS Excel VBO Page 8 of 26
Direction In Text The direction in which the next empty cell is required.
This should start with any of "U", "D", "L" or "R" to find
a cell up, down, left or right respectively. The
direction parameter is not case-sensitive.
True to activate the cell which is found; False to just
Activate
In Flag return the reference and leave the active cell as it
Cell?
was before. Default is False.
The cell reference identifying the next empty cell from
Cell the active cell in the direction given. An empty value
Out Text
Reference indicates that there were no empty cells between the
active cell and a boundary.
about:blank 06/24/2020
MS Excel VBO Page 9 of 26
Closes all instances of excel which have been opened by this business object, either
through "Create Instance" or "Open Instance" and which have not been discarded through
"Close Instance" or "Release Instance"
Preconditions:
about:blank 06/24/2020
MS Excel VBO Page 10 of 26
about:blank 06/24/2020
MS Excel VBO Page 11 of 26
Gets the current worksheet into a collection. This will read the worksheet and store the
contents into the collection. The first row will be treated as the column names and will be
used as the column names in the generated collection. Params: - handle : Number : The
integer identifying the instance in which the worksheet resides. Default (0) indicates the
current instance. - Workbook Name : Text : The name of the workbook on which the sheet
resides. Default ("") indicates the active workbook on the instance. - Worksheet Name :
Text : The name of the worksheet which is required as a collection. Default ("") indicates the
active sheet within the workbook. Output: Data - Collection - The data from the worksheet.
Exceptions: - Bad Handle : If the given handle did not correspond to an instance. -
Workbook Not Found : If the given workbook did not exist on the specified instance. -
Worksheet Not Found : If the specified worksheet does not exist on the specified workbook.
Preconditions:
about:blank 06/24/2020
MS Excel VBO Page 12 of 26
Preconditions:
about:blank 06/24/2020
MS Excel VBO Page 13 of 26
Handle In Number
Workbook In Text
Worksheet In Text
Position Out Number
Preconditions:
1.34 Go To Cell
Activates the cell in the given workbook, identified by the given cell reference. Params: -
handle : Number: The integer handle identifying the excel instance (0 represents 'active'
instance) - Cell Reference : Text : the cell reference to go to NOTE - the active sheet in the
instance is the one on which the cell is active
about:blank 06/24/2020
MS Excel VBO Page 14 of 26
Moves a specified number of rows and columns from the currently active cell and returns the
new cell reference. If the resultant cell reference is the same as the active cell before this
action was called, this action has 'failed'. This is usually because the active cell is too close
to a boundary.
about:blank 06/24/2020
MS Excel VBO Page 15 of 26
Activates the next empty cell that can be found above the active cell.
1.40 Hide
Hides the window attached to the instance identified. Params: - handle : Number : The
handle identifying the excel instance to hide. The default of zero shows the currently active
instance. Exceptions: - Bad Handle : If the given handle did not correspond to an instance.
Preconditions:
about:blank 06/24/2020
MS Excel VBO Page 16 of 26
1.44 Insert
about:blank 06/24/2020
MS Excel VBO Page 17 of 26
workbook on the given instance. Output: Read Only? : Flag : True to indicate that the
workbook is read only; False to indicate that it is writable. Exceptions: - Bad Handle : If the
given handle did not correspond to an instance. - Workbook Not Found : If the given
workbook did not exist on the specified instance.
about:blank 06/24/2020
MS Excel VBO Page 18 of 26
Preconditions:
1.49 Paste
about:blank 06/24/2020
MS Excel VBO Page 19 of 26
Preconditions:
Saves the current workbook using the workbook name as the file name. This is the
equivalent of calling the Save Workbook action with the default values for 'handle' (0) and
'Workbook Name' ("") Exceptions: - Bad Handle : If there is no active instance. - Workbook
Not Found : If there is no active workbook on the instance.
about:blank 06/24/2020
MS Excel VBO Page 20 of 26
Params : - File name : Text : The path and name of the file to which the workbook should be
saved. Output : - New Workbook Name : Text : The new name with which the workbook is
identified within the excel instance.
Saves the workbook using the current name as a filename. Params: - handle : Number : The
integer identifying the instance on which the workbook should be saved. The default of 0
indicates the current instance. - Workbook Name : The name of the workbook to be saved.
The default of empty indicates that the active workbook should be saved. Exceptions: - Bad
Handle : If the given handle did not correspond to an instance. - Workbook Not Found : If the
given workbook did not exist on the specified instance.
about:blank 06/24/2020
MS Excel VBO Page 21 of 26
1.58 Select
Preconditions:
Sets the "current active" instance to that specified. Params: - handle : Number : The handle
of the instance that should be set as the current instance. The default of zero only has the
effect of throwing an exception if no current instance is set, otherwise it's a no-op.
Exceptions: - Bad Handle : If the given handle did not correspond to an instance.
about:blank 06/24/2020
MS Excel VBO Page 22 of 26
Preconditions:
about:blank 06/24/2020
MS Excel VBO Page 23 of 26
1.65 Show
Shows a window attached to the instance identified. Params: - handle : Number : The
handle identifying the excel instance to show. The default of zero shows the currently active
instance. Exceptions: - Bad Handle : If the given handle did not correspond to an instance.
about:blank 06/24/2020
MS Excel VBO Page 24 of 26
Preconditions:
about:blank 06/24/2020
MS Excel VBO Page 25 of 26
about:blank 06/24/2020
MS Excel VBO Page 26 of 26
about:blank 06/24/2020