Can't you add it as a .csv data source?
-------------------------------------------------------------
Hugo Ahlenius E-Mail: [EMAIL PROTECTED]
Project Officer Phone: +46 8 7410451
UNEP GRID-Arendal Fax: +46 733 403285
Stockholm Office Mobile: +46 733 467111
WWW: http://www.grida.no
-------------------------------------------------------------
| -----Original Message-----
| From: Adams, Stephen [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, July 24, 2002 15:19
| To: CF-Talk
| Subject: Putting a comma separated file into a multi dimension array.
|
|
| **********************************************************************
| WESTMINSTER CITY COUNCIL
| Please refer to the disclaimer beneath this message
| **********************************************************************
|
| Hello,
|
| I have a comma separated file that contains about 11 columns
| and twenty odd
| rows. Now I would like to be able to put this into an array
| so that I can
| reference and call cells of this array and display them onto
| a webpage. I
| can easily put my file into a single dimension array, like this:
|
| <cffile action="READ"
| file="G:\file.txt"
| variable="List">
|
| <!--- Creates returnchar which is used as delimiter in
| ListToArray function.
| --->
| <cfset returnchar = "#chr(13)##chr(10)#">
|
| <!--- Turns list from cffile tag into an array. --->
| <!--- <cfset MyArray = #ListToArray(List,returnchar)#>
|
| Which is fine, but I am after a multi-dimensional array so
| that I can go
| <cfoutput>#MyArray[2][4]#</cfoutput> and display the info in
| that cell.
|
| Does anyone know how I can do this?
|
| Stephen
|
|
| **********************************************************************
| Westminster City Council switchboard:
| +44 20 7641 6000
| **********************************************************************
| This E-Mail may contain information which is
| privileged, confidential and protected from
| disclosure. If you are not the intended recipient
| of this E-mail or any part of it, please telephone
| Westminster City Council immediately on receipt.
| You should not disclose the contents to any other
| person or take copies.
| **********************************************************************
|
|
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists