Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter Twenty-twoConversion Functions (continued)

ConvertFile Function

Overview

The ConvertFile function performs a format translation of one file format to another. The function automatically detects the file types based on file extensions.

Use of the conversion features in no way abrogates the per workstation licensing requirements of application or its components. Use of the conversion SDK functions serving commercial production services, web services or large scale filing is prohibited under the standard license agreement unless covered by a separate and specific license agreement.

Syntax/Parameters

Syntax

int = ConvertFile ( string source, string destination,
               [handle hLog], [string options] );

Parameters

source

A string containing the source file to convert. The filename must have a supported extension and contain supported data.

destination

A string containing the destination file to write the results. The filename must have a supported extension and contain supported data. If a file exists with the same name, it is automatically overwritten.

hLog

An optional log object which will receive the log from the import. If a log is not specified, the default log will receive the information.

options

An optional string that specifies a series of property: value; parameters to override the application’s current conversion settings. When the See Conversion Options and Parameters at the beginning of this section.

Return Value

An int as ERROR_NONE (0) or a formatted error code on failure.

Remarks

Since converting may require certain components such Microsoft Office, programmers must be sure to setup the system and user account to allow access to office OLE features (simply installing the applications and running them once is enough to initialize Word and Excel).

By default, the function will use the conversion settings of the application. To control this, set options and use the “Defaults: True” option to reset all the conversion parameters.

A specific import filter can be selected using the “ConversionName” parameter. For example, the direct Excel to HTML filter can be selected by adding “ConversionName: XLSXtoHTML”.

The ConvertFile function options are limited by the underlying application. If the application does not support the conversion, an error will be returned.

Related Functions

Platform Support

Go13, GoFiler Complete, GoFiler Corporate, GoFiler, GoXBRL

Page revised 2024-12-13