How To Convert csv file to xml file

10 views
Skip to first unread message

Archana

unread,
Dec 22, 2008, 5:31:51 AM12/22/08
to CSVChat
Hello ,

I have CSV file ie comma seperated values file. I am converting that
to xml file , by using streamreader ,split function and an array. Its
works fine.

But Problem is When I have A data with camma eg :
aaaaa,fsdjf,"kfjasdjf,fsdjkf,jfhdjsk",fjsdhjf

Its is splitling the data also, irresptive of wherther data is
enclosed in quotes or not.

Please help me , How to resolve this Issue.


Thanks & Regards,
Archana.CM
----------------------------

shriop

unread,
Dec 22, 2008, 10:22:31 AM12/22/08
to CSVChat
Unfortunately, there really is no quick code change that will fix it.
We have a code sample up of how to use our components to accomplish
this task fairly easy, http://www.csvreader.com/code/cs/csv_to_xml.php
. The components were built specifically because of the pain trying to
split on commas.

Bruce Dunwiddie
Reply all
Reply to author
Forward
0 new messages