User Guide Cancel

IsDDX

 

Description

Determines whether a DDX file exists and is valid, or if a string contains valid DDX instructions.

Return

True, if the value represents a valid DDX file or string. False, otherwise.

Category

True, if the value represents a valid DDX file or string. False, otherwise.

Syntax

IsDDX(path)
IsDDX(value)
IsDDX(path) IsDDX(value)
IsDDX(path) 
 
IsDDX(value)

See also

History

ColdFusion (2018 release): Introduced named parameters.

ColdFusion 8: Added this function.

Parameters

Parameter

Description

path

Pathname to the DDX file or a string of DDX instructions. The pathname can be absolute or relative to the CFM page that calls it and must be enclosed in quotation marks.

Usage

This function returns False if the pathname to the DDX file is invalid, the pathname to the DDX file is null, the DDX file does not conform to the schema supported by ColdFusion, or the DDX instructions are invalid.

Example

 

<cfscript>
theDir=GetDirectoryFromPath(GetCurrentTemplatePath());
theFile=theDir & "sheets/Books_AddColumn.xlsx";
filetype = IsDDX(theFile);
writeoutput("Is this file of DDX file type: " & filetype & "<br>");
</cfscript>
<cfscript> theDir=GetDirectoryFromPath(GetCurrentTemplatePath()); theFile=theDir & "sheets/Books_AddColumn.xlsx"; filetype = IsDDX(theFile); writeoutput("Is this file of DDX file type: " & filetype & "<br>"); </cfscript>
<cfscript>
    theDir=GetDirectoryFromPath(GetCurrentTemplatePath()); 
    theFile=theDir & "sheets/Books_AddColumn.xlsx";
    filetype = IsDDX(theFile);
    writeoutput("Is this file of DDX file type: " & filetype & "<br>");
</cfscript>

Output

Is this file of DDX file type: NO

Get help faster and easier

New user?