<CFSET filearray = ArrayNew(2)> <CFLOOP List="#file_content#" Index="rc" Delimiters="#Chr(10)#"> <CFSET rc = ArrayAppend(filearray, listToArray(rc,"|"))> </CFLOOP> Bryan Love ACP Internet Application Developer Telecommunication Systems Inc. [EMAIL PROTECTED] -----Original Message----- From: Mike Kear [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 5:06 PM To: CF-Talk Subject: RE: Making 2D array Thanks. I already knew cfset filearray = arraynew(2). It's the rest I don't know how to do - how to break the text along the rows up into cells at the pipe character. (the sample text I sent in my original message wrapped - it was originally 4 lines only) I need to do this so I can take this large text file, and break it up into 6 smaller files, delete some rows, delete some columns, reformat others, turn them into tables, and save them as includes for a template to use based on a form input. SO thanks for your help Alex, but it doesn't tell me what I need to know. I have a large text file, I need to turn it into an array or structure or some other format so I can manipulate the contents. I figured using an Array was the way to do it. Isnt it? So I still don't know how to do it. (sigh) Cheers, Mike Kear Windsor, NSW, Australia AFP WebWorks cfset filearray = arraynew(2) but what are you going to do with the sencond dimension. why not just load the data into a db table which is probably the easiest. Or put it in a structure. On Wed, 22 Aug 2001, Mike Kear wrote: > I get a large ASCII text file every month, and I want to read it into a 2D > array so I can manipulate it then write it out to a HTML file in a series of > tables. But I'm stumped with the second dimension of the array. I can > read it into one dimensional table like this: > > > <CFSET filearray = ArrayNew(1)> > <CFLOOP List="#file_content#" Index="rc" Delimiters="#Chr(10)#"> > <CFSET rc = ArrayAppend(filearray, rc)> > </CFLOOP> > > How do I make it into the two dimensional array instead? Here's a sample > of the text I get. I want the elements in the second dimension to break on > the pipe character. > > > > [sample text] > UBS Asset Management (Australia) Ltd|SBC0813AU|UBS Australian Bond|339.30|7.77|5.31|8.02|0.42|~~~~~|8/55|| > Colonial First State Invest Aust Ltd|FSF0027AU|Col First State Wsale AustBond|24.42|7.50|5.16|7.88|0.46|~~~~|7/55|| > IOOF Funds Management|IOF0012AU|IOOF Flex Tr FI|6.23|6.91|5.14|7.47|1.12|~~~~~|5/55|| > Commonwealth Financial Services|COM0011AU|C'Wealth Bond Fund|146.70|6.68|4.91|6.46|1.11|Not Rated|0/55|| > [end sample] > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists