Robert,
It is a known issue that all of the CF list functions ignore empty list
elements.... "a,,c" is a list with two elements, not three.  There are
some UDFs somewhere out there to deal with this. One quick fix I've seen
is to replace ",," with ",!," (where "!" is something special that you
don't expect in the input).  This will turn empty list elements in "!",
which you then has to test for.

        Mark

-----Original Message-----
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 09, 2006 9:04 AM
To: CF-Talk
Subject: RE: cfhttp QUESTION

Why does your data file not have the right number of columns? Is that
our of your control? 


.......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Robert Harrison [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 08, 2006 3:31 PM
To: CF-Talk
Subject: cfhttp QUESTION

Now I'm canning the EXCEL COM object and using CFHTTP to parse a comma
delimited format. This works fine when the data is perfect. But when
this data is missing a column from a row and doen't have the right
number of columns it says wrong number of rows and craps out. 
 
Here's a perfect data set... this works:
 
Email Address,First Name,Last Name,Company,Title,Address Line 1,Address
Line 2,City,State,Zip,Phone,Fax,Website
[EMAIL PROTECTED],Avi,Hayon,,,,,,,,,,
[EMAIL PROTECTED],Anthony V.,Ambrose RPLU,,,,,,,,,,
[EMAIL PROTECTED],Arturo,Antezan,,,,,,,,,,
[EMAIL PROTECTED],Anthony R.,Armstrong,,,,,,,,,,
[EMAIL PROTECTED],Arthur,Baden,,,,,,,,,,
[EMAIL PROTECTED],Alan H.,Barbanel,,,,,,,,,,
[EMAIL PROTECTED],Abbey M.,Gallegos,,,,,,,,,,
[EMAIL PROTECTED],Amy J.,Berezein,,,,,,,,,,
 
 
When the data looks like this (an actual Excel csv file) it craps:
 
[EMAIL PROTECTED],Avi,Hayon,,,,,,,,,,
[EMAIL PROTECTED],Anthony V.,Ambrose RPLU,,,,,,,,,,
[EMAIL PROTECTED],Arturo,Antezan,,,,,,,,,,
[EMAIL PROTECTED],Anthony R.,Armstrong,,,,,,,,,,
[EMAIL PROTECTED],Arthur,Baden,,,,,,,,,,
[EMAIL PROTECTED],Alan H.,Barbanel,,,,,,,,,,
[EMAIL PROTECTED],Abbey M.,Gallegos [EMAIL PROTECTED],Amy
J.,Berezein 
 
 
Any ideas????
 
Thanks,
 
Robert






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259761
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to