Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter EighteenDataView Integration (continued)

DataViewOpenFile Function

Overview

The DataViewOpenFile function opens an MDI Data View workbook from a number of source file formats.

Syntax/Parameters

Syntax

handle = DataViewOpenFile ( string source, [dword type] );

Parameters

source

A string containing a qualified filename or a URL.

type

An optional dword specifying an override file type. If omitted, the script will attempt to identify the file type and uses that type.

Return Value

A window handle or NULL_HANDLE (0) if there is an error. Use the GetLastError function to retrieve a formatted error code. The value is the handle to the MDI container window for all views displayed and can be used to access other window functions. This handle is not a script object and does not need to be closed.

If the view is opened, the Edit Manager entry index can be retrieved by using the GetLastError function.

Remarks

If the application desktop is not running, the function will fail by returning NULL_HANDLE with a last error of ERROR_CONTEXT. If the host application does not support this feature, the last error will be ERROR_CANCEL.

This function differs from running a FILE_OPEN from the RunMenuFunction in that it provides direct access to the Data View manager.

If the file format is not supported, ERROR_FUCTION_NOT_SUPPORTED will be placed in the last error buffer.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL