Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/64287c72d5f54e1da294cc2c10b5ad86 to your computer and use it in GitHub Desktop.
Save trycf/64287c72d5f54e1da294cc2c10b5ad86 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
excelColumnList = 'YR,MNTH,ANNIV,FIRST NAME,LAST NAME,EMAIL,NOTES';
mappedColumnList= ',,,YEAR,MONTH,,First Name,Last Name,Email,COMMENTS';
mappedColumn= 'Last Name';
while(left(mappedColumnList,1)==",") {
mappedColumnList = right( mappedColumnList,(len(mappedColumnList)-1) ) ;
}
local.index = ListFindNoCase(mappedColumnList, mappedColumn,',', true);
local.returnValue = ListGetAt(excelColumnList,local.index,",",true) ;
writeDump(local.returnValue);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment