Hello everyone, I'm trying to read CSV file and output with ColdFusion. I store all records in array and I have to pull out just first and last column with all records. My current code gives me just a row with all columns. Can anyone help with this please? Here is my code:
<cffile action="read" file="#ExpandPath('Status.csv')#" variable="myfile">
<cfset myarray = ListToArray(myfile,chr(13))>
<cfset cnt = ArrayLen(myarray)>
<cfloop index="index" array="#myarray#">
<cfoutput>
#index#
<br/>
</cfoutput>
</cfloop>