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]
>
>
> Cheers,
> Mike Kear
> Windsor, NSW, Australia
> AFP WebWorks
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists