: [cfaussie] Re: Quick List question
Andrew, I'm curious
is it just the ListGetAt(position) function that's the grief? it might be
broken itself
I wonder if all list functions are similarly broken: if you convert your
list to an array with ListToArray(list) first would you get the correct 4
items
: [cfaussie] Re: Quick List question
Andrew, I'm curious
is it just the ListGetAt(position) function that's the grief? it might
be broken itself
I wonder if all list functions are similarly broken: if you convert
your list to an array with ListToArray(list) first would you get the
correct 4 items
-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 10 September 2008 4:03 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Nope all list functions.
I have opened the discussion in an area that can't be named, so I
.
www.aegeon.com.au
Phone: +613 9015 8628
Mobile: 0404 998 273
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Steve Onnis
Sent: Wednesday, 10 September 2008 4:04 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Why don't you put
On Wed, Sep 10, 2008 at 01:45:46PM +0800, Brett Payne-Rhodes wrote:
I don't think list processing is clever enough to say Ignore delimiters that
are inside double quotes so it treats the comma inside your 'third' element
as a valid delimiter.
You might have to run a clever bit of regex
into a nightmare for yourself.
Steve
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 10 September 2008 4:18 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Ok first of all this is a one
] On Behalf
Of [EMAIL PROTECTED]
Sent: Wednesday, 10 September 2008 4:19 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
On Wed, Sep 10, 2008 at 01:45:46PM +0800, Brett Payne-Rhodes wrote:
I don't think list processing is clever enough to say Ignore delimiters
4:18 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Its not broken
You define a character as a delimiter and it breaks the list up into items
separated by that character. CF doesn't know it's a CSV formatted string,
and why would it care? Its doing what you tell
-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Steve Onnis
Sent: Wednesday, 10 September 2008 4:23 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Do a CFHTTP, get it into a query recordset and loop over the query to
rebuild your CSV. At least
[mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 10 September 2008 3:21 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Scott,
Cheers but I don't see how that helps, I am aware of how empty lists are
handled. The problem lies in this example
List
@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Nope all list functions.
I have opened the discussion in an area that can't be named, so I will wait
for what responses I get from there. I am curious why it has never been
fixed?
And to confirm it, yes all list functions do not work as expected
Hi Andrew,
Not sure if this works for your application but we've used this
ColdFusion UDF before in a project for CSV parsing:
http://www.bennadel.com/index.cfm?dax=blog:991.view
It converts your file data into an array not a list, but at least it
takes care of commas within quotes, and
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Steve,
How do you get it to a query, when the list function is broken? Can you
explain that more?
However, I personally am not interested in a solution. It has been
completed, it is something that I feel should work
Thanks Steve,
I'll admit that I didn't know that. Could be very useful...
Cheers,
Brett
B)
Steve Onnis wrote:
You didn't know that
cfhttp url=csvfile.txt name=csvQry/cfhttp
...will return to you a query object based on the csv data in the file?
Try this for an example. Just
.
www.aegeon.com.au
Phone: +613 9015 8628
Mobile: 0404 998 273
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Steve Onnis
Sent: Wednesday, 10 September 2008 4:41 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
You didn't know
PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
You didn't know that
cfhttp url=csvfile.txt name=csvQry/cfhttp
...will return to you a query object based on the csv data in the file?
Try this for an example. Just save it to a file and run it.
cfsetting
: +613 9015 8628
Mobile: 0404 998 273
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf
Of Steve Onnis
Sent: Wednesday, 10 September 2008 4:41 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
You didn't know
September 2008 5:19 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
why not just grab an existing java lib which supports CSV?
like http://supercsv.sourceforge.net/ or something?
On Wed, Sep 10, 2008 at 5:15 PM, Andrew Scott [EMAIL PROTECTED]
wrote:
Ok that doesn't
@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Ok that doesn't work for me.
--
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 9015 8628
Mobile: 0404 998 273
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
[mailto:[EMAIL PROTECTED] On Behalf
Of Steve Onnis
Sent: Wednesday, 10 September 2008 5:22 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Did you make sure you fixed the lines up ? The email wrapped some of the
lines of code :)
Also that was done quickly on CF8
That's an example of the tag
The CODE is below that
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 10 September 2008 5:28 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Yeah I
: Quick List question
That's an example of the tag
The CODE is below that
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 10 September 2008 5:28 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List
: Quick List question
That's an example of the tag
The CODE is below that
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 10 September 2008 5:28 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List
The code is this
cfsetting enablecfoutputonly=Yes showdebugoutput=No /
cfif structKeyExists(URL, docsv)
cfset csvdata = List Item ##1, List Item ##2, inner List Item ##1, inner
List Item ##2, List Item ##4 / cfoutput#csvdata#/cfoutput
cfelse
cfhttp
CyberAngel wrote:
Sorry,
I tried that too, same result. Now that I am at home, I'll try it here as
well.
I tried this variation and it worked fine:
cfif structKeyExists(URL, docsv)
cfset csvdata = Col_1,Col_2,Col_3,Col_4chr(13)chr(10) /
cfset csvdata = csvdata 'List Item ##1, List
@googlegroups.com
Subject: [cfaussie] Re: Quick List question
CyberAngel wrote:
Sorry,
I tried that too, same result. Now that I am at home, I'll try it here
as well.
I tried this variation and it worked fine:
cfif structKeyExists(URL, docsv)
cfset csvdata = Col_1,Col_2,Col_3,Col_4chr(13)chr(10
.
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Kym Kovan
Sent: Wednesday, 10 September 2008 6:35 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
CyberAngel wrote:
Sorry,
I tried that too, same result. Now
Sent: Wednesday, 10 September 2008 6:40 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
This is the file
http://www.novahost.com.au/csv.cfm
This is on CF8.0.1. I also checked it on CF6.1 and worked fine.
-Original Message-
From: cfaussie@googlegroups.com
:40 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
This is the file
http://www.novahost.com.au/csv.cfm
This is on CF8.0.1. I also checked it on CF6.1 and worked fine.
--~--~-~--~~~---~--~~
You received this message because you
What's the best charset to use?
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Steve Onnis
Sent: Wednesday, 10 September 2008 6:40 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
This is the file
http
Ryan,
Sorry I didn't see your post, that would have done the trick as well.
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
Sent: Wednesday, 10 September 2008 4:36 PM
To: cfaussie
Subject: [cfaussie] Re: Quick List question
myfile = FileOpen(#ExpandPath(test.csv')#, read);
andrew, is that a typo in the post or in the code as well? you've got
(test.csv') with a closing single quote, but not open.
Perhaps rewrite it to
myfile = FileOpen( expandPath(test.csv), read )
to make sure
Hi
Before reading .csv files, I typically try to find and replace any repeating
delimiters because as you discovered, CF ( for me its 6.1 ) treats them as one
delimiter and not two.
eg replace two commas with the string comma space comma.
cfset CSV_DATA_LINE = replace(CSV_DATA_LINE, ,,, , ,,
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Scott Thornton
Sent: Wednesday, 10 September 2008 3:15 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
Hi
Before reading .csv files, I typically try to find and replace any
:[EMAIL PROTECTED] On Behalf
Of Barry Beattie
Sent: Wednesday, 10 September 2008 3:12 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Quick List question
myfile = FileOpen(#ExpandPath(test.csv')#, read);
andrew, is that a typo in the post or in the code as well? you've got
I don't think list processing is clever enough to say Ignore delimiters that
are inside double quotes so it treats the comma inside your 'third' element as
a valid delimiter.
You might have to run a clever bit of regex to replace said commas before the
list processing and once you have the
Andrew, I'm curious
is it just the ListGetAt(position) function that's the grief? it might
be broken itself
I wonder if all list functions are similarly broken: if you convert
your list to an array with ListToArray(list) first would you get the
correct 4 items or incorrect 6 items?
On
37 matches
Mail list logo