OFC. - Office-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Browser and Office (Acc.-Engine) > OFC. - Office-Commands > MS-Excel Scripting >

OFC. - Office-Commands

OFC. - Office-Commands/MS-Excel Scripting      

Previous Top Next


 

MiniRobotLanguage (MRL)

 

OFC.Excel|SCROLL_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 SCROLL_UPDOWN Subcommand to scroll your Sheet by one or more line(s) up or down.

 

Parameter P1 specifies how many lines to scroll up (negative parameter) or down (positive parameter).

 

' Scroll 2 Lines down

OFC.excel|SCROLL_UPDOWN|2

 

'Scroll 2 Lines up

OFC.excel|SCROLL_UPDOWN|-2

 

The Command will drop an "1" on the TOS if it was successful, otherwise a "0".

 

 

Syntax:

 

OFC.Excel|SCROLL_UPDOWN|P1

 

 

Parameter Explanation:

 

P1 - 0/1 - FORCE Flag suppress Error-Messages and force Excel to close

 

 

Example:

 

' Excel 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 2 Lines down

 OFC.excel|SCROLL_UPDOWN|2

 PAU.1

 'Scroll 2 Lines up

 OFC.excel|SCROLL_UPDOWN|-2

 PAU.1

NEX.

 

MBX.!

'PAU.4

'OFC.excel|SAVE|1

OFC.excel|CLOSE|1

END.

 

 

 

Remarks:

To Close your Excel-Instance, use the CLOSE Subcommand.

However, its not necessary to close an Excel File, if you want to leave it open, even after the SPR exits.

 

 

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:

 

  !Excel-Scripting

  Excel_Open

  Excel_SCROLL_LEFTRIGHT

  Excel_Page_UD