Checks if given file is spreadsheet file or not

isSpreadsheetFile(file) → returns boolean

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

Argument Reference

file string

Any file

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">
<cfif structKeyExists(form, "submit")>
<cfif isSpreadsheetFile(form.myfile)>
	<cffile action="upload" destination="#getTempDirectory()#" filefield="form.myfile" nameconflict="makeunique">

Fork me on GitHub