<< Click to Display Table of Contents >> Navigation: 3. Script Language > Browser and Office (Acc.-Engine) > OFC. - Office-Commands > MS-Excel Scripting > OFC. - Office-Commands |
MiniRobotLanguage (MRL)
OFC.Excel|PAGE_UPDOWN
SCROLL MS-Excel worksheet via the SPR
Intention
Generally you will need to OPEN a Excel-Instance first, this is done using the "OPEN" Subcommand.
Use the PAGE_UPDOWN Subcommand to scroll your Sheet by one or more full page(s) up or down.
Parameter P1 specifies how many pages to scroll up (negative parameter) or down (positive parameter).
' Scroll down 2 Pages
OFC.excel|PAGE_UPDOWN|2
' Scroll up 2 Pages
OFC.excel|PAGE_UPDOWN|-2
The Command will drop an "1" on the TOS if it was successful, otherwise a "0".
Syntax:
OFC.Excel|PAGE_UPDOWN|P1
Parameter Explanation:
P1 - (numeric) - Negative or positive number of pages to scroll up (negative) or down (positive)
Example:
' Excel PAGE-SCROLL UP/DOWN Example
OFC.excel|OPEN||0|1
' Activate by name
OFC.excel|SHEET_Activate|2
FOR.$$LOP|1|199
CAL.$$LOA=$$LOP+1
OFC.excel|WRITE|A$$LOP:A$$LOP|$$LOP
OFC.excel|FORMULA SET|B$$LOP:XX$$LOP|=A$$LOP*78+$$LOP|0
NEX.
FOR.$$LOP|1|90
' Scroll down
OFC.excel|PAGE_UPDOWN|2
PAU.1
' Scroll up
OFC.excel|PAGE_UPDOWN|-2
PAU.1
NEX.
MBX.!
'PAU.4
'OFC.excel|SAVE|1
OFC.excel|CLOSE|1
END.
Remarks:
You can not scroll much more down then there are lines in your Spreadsheed.
Limitations:
These commands need an valid Installation of MS-Office Excel. It will check if MS Excel is properly installed, and if not just do nothing.
The PAGE_UPDOWN Subcommand will only work with Excel-Instances that have previously been opened with the OPEN Subcommand of the same Robot-Instance.
If the command succeeds, it will drop an "1" on the TOS.
See also: