<< 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|NUMBER_TO_LETTER
Convert a numeric value int othe Alphabetic value of the Excel X-Axis
Intention
This command does not need Excel to be opened. It is a pure mathematical operation.
It will convert a pure numberical count to the Excel-X-Axis "Letter-Number".
This way you can more easily iterate through all fields and still use the "RANGE" Parameter in other commands.
' Convert "99" to "DU"
OFC.excel|NUMBER_TO_LETTER|$$NUM|$$RES
MBX.$$RES
Syntax:
OFC.Excel|NUMBER_TO_LETTER|P1[|P2]
Parameter Explanation:
P1 - (numeric) value that specifies the numeric representation of a Cell on teh X-Axis starting with "1".
P2 - (optional/Variable) Variable that will receive the result of the operation. If omitted, TOS is used.
Example:
' Excel NUMBER_TO_LETTER Example
OFC.excel|OPEN||0|1
DBP.---------------
' Activate by name
OFC.excel|SHEET_Activate|2
OFC.excel|write|A9:DU9|54
OFC.excel|write|A6:CU9|Hallo
OFC.Excel|LastRow|$$REA
OFC.Excel|LastColumn|$$REB
OFC.Excel|NUMBER_TO_LETTER|$$REB|$$REB
MBX.Last used Column $$REA $crlf$ Last used Row: $$REB
DMP.6
MBX.Click to Close
OFC.excel|CLOSE|1
END.
Remarks:
-
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.
Will work from "A" to "ZZZZZZ" (equals 321272406).
See also: