Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: Complex CSV file reading

$
0
0

Hi Raghu/all

 

I observed other issue with this approach..if data is coming like below, its throwing error.

 

 

If there is no data coming in any field, its creating just commas ,, with out any quotes ..(check for Name2 row values)

 

 

UTF8

Name,ID,Description,Location

"Name1","123","He is developer","IND"

"Name2",,"He is

CEO","IND"

"Name3","567","He is CIO, from today","USA"

 

 

 

 

How to add same variation to below code

 

input = input.replace("\",\"", "__________").replace(",", "").replace("__________", "\",\"") 

                 .replace("\"\r\n\"", "__________").replace("\r\n", " ").replace("__________", "\"\r\n\"");

 

 

 

Thanks in advance.

 

 

Regards

Siri


Viewing all articles
Browse latest Browse all 8581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>