isSpreadsheetFile

Checks if given file is spreadsheet file or not

isSpreadsheetFile(file) → returns boolean

This function requires Adobe ColdFusion.  Not supported on Lucee, etc.

isSpreadsheetFile Argument Reference

file string
Required

Any file

Examples sample code invoking the isSpreadsheetFile function

Here we have simple example to check the given file is spreadsheet or not.

<form method="post" enctype="multipart/form-data">
	<input type="file" name="myfile" />
	<input type="submit" name="submit" value="submit">
</form>
<cfif structKeyExists(form, "submit")>
<cfif isSpreadsheetFile(form.myfile)>
	<cffile action="upload" destination="#getTempDirectory()#" filefield="form.myfile" nameconflict="makeunique">
</cfif></cfif>

Fork me on GitHub