The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. January 08, 2009, 12:40:33 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Parsing .CSV file with CF  (Read 755 times)
jairez
Expert
****
Offline Offline

Posts: 109


JTFC!


View Profile
« on: August 05, 2008, 09:53:28 AM »

OK ... this is turning out to be a bit more difficult than originally anticipated.

Kapn ... do you have ideas for how to parse a .CSV file using CF? 

I've got something I'm going to play with but I wanted to put this out there while I try to roll my own. 

Thanx in advance.

    -ja


Logged

Two wrongs don't make a right --- but three rights make a left.
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 774



View Profile WWW
« Reply #1 on: August 05, 2008, 11:30:14 AM »

Parsing the CSV should be a pretty simple process. 

Read the CSV in with CFFILE and then do a CFLOOP list="#cffileVar#" and use #chr(10)# or #chr(13)# for the delim - or whatever the line terminator is.

then your index in the loop will have the line from the file that you can do whatever you need to with.

if you need a more specific example or some code help let me know.
Logged

We can't stop here, this is bat country.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!