Launches Microsoft Excel and loads the current Excel sheet.
The
Excel sheet shown in this screenshot was
created by the example script below. Hint:
If you copy an example script from
an HTML page to the script editor, you
may encounter errors. For
better results paste the script to TextEdit first and
then copy/paste it from there to the script editor.
Parameters:
Name |
Type |
Description |
xlHandle |
Integer |
A handle
to an Excel document. The document must have been created by using the
function XLCreateFromTemplate
and the Integer we obtained from it is used as xlHandle
here. Value: 0
- n |
methodName |
String |
A command string indicating the operation to be executed
with Excel: launch |
Available in:
WindowMain |
WindowLink |
YES |
YES |
Used in:
XojoScript
Name |
GUID |
Save as
Excel sheet : seminar invoice list |
6DDAFA87-2862-4129-8416-CBD57C5CDF9A |
Save as
Excel sheet : seminar participants list |
03C22A3D-FF28-4E22-BB99-D7626BF5F0A4 |
Save As
Excel sheet : participants list |
E50602AA-F1F7-42E6-A44A-78456DD9B778 |
Hint: You can
find references to XojoScripts which make use of this function by sending the
following SQL statement to the database:
Select id,GUID, ScriptName,ScriptCode from
im_scripts where ScriptCode Like '%XL(%'
Example XojoScript:
Dim
hXL As Integer
// Display SaveAs Dialog to create new file
// based on the document with the name passed in
// as a parameter. The document must be loaded
// in the TEMPLATES section beforehand.
// Get Handle to newly created Excel file
hXL
= XLCreateFromTemplate("myXLtest.xls")
If
hXL > -1 Then
Dim i As integer
For i = 2 To 100
XLWriteString(hXL,i,0,"Zeile "
+ Str(i))
XLWriteNumber(hXL,i,1,i)
XLWriteBoolean(hXL,i,2,i)
Next
XlSave(hXL)
XL(hXL,"launch")
End If