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_LEFTRIGHT

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.

Also you need to activate the sheet first using:

 

  ' Activate by Number

  OFC.excel|SHEET_Activate|1

 

Use the SCROLL_LEFTRIGHT Subcommand to scroll your Sheet by one or more cell(s) left or right.

 

Parameter P1 specifies how many cells to scroll left (negative parameter) or right (positive parameter).

 

 'Scroll 2 Cells to the right

 OFC.excel|SCROLL_LEFTRIGHT|2

 

 'Scroll 2 Cells to the left

 OFC.excel|SCROLL_LEFTRIGHT|-2

 

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

 

 

Syntax:

 

OFC.Excel|SCROLL_LEFTRIGHT|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 Cells to the right

 OFC.excel|SCROLL_LEFTRIGHT|2

 PAU.1

 'Scroll 2 Cells to the left

 OFC.excel|SCROLL_LEFTRIGHT|-2

 PAU.1

NEX.

 

MBX.!

'PAU.4

'OFC.excel|SAVE|1

OFC.excel|CLOSE|1

END.

 

 

 

 

Remarks:

You may not be able to scroll more to the right then there are used Cells in your sheet!

 

 

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 SCROLL_LEFTRIGHT 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_UPDOWN

  Excel_Page_UD