Hi Chris, > I process a lot of CSV format files. Currently, when I > read the data, I have problems when there's a COMMA in > the middle of a field, since the INPUT command treats it > as a new field, even though it's not delimited by QUOTES.
I would use Line Input then pass it to a procedure that split it at comma and rejoined values that began with a quote through the array element that ended with a quote (realize that there may be two or more commas within a single field). This could be dangerous, however, if the fields ALSO included quotes, as the encoding for these is usually to double them up: 1,$34,"hello, out there!","he said ""whoa!""","shawn" 2,$12,"hi!","he, like, didn't care, you know?","tom" 3,$5,"yo!","I said ""yes?"", but he didn't respond","joe" I hate to tell people 'back to formula' as much as I have been recently, but there are just so many problems when using CSV data. You're really better off switching to XML for the files you receive. I understand it's a very difficult conversion from what you've already got and it's a learning experience, too. But it's really necessary. And YES they can be generated VERY easily from just about anything. I'd be happy to share some really nifty code I've written to handle XML. Regards, Shawn K. Hall http://12PointDesign.com/ http://ReliableAnswers.com/ '// ======================================================== Money is the root of all evil. Send $20 and a SASE for more information. '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
