• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CSV File Reader
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CSV File Reader


  • Subject: Re: CSV File Reader
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Tue, 31 Aug 2010 18:00:18 -0400


That would be a good addition I think.  I had already written my own for escaping/unescaping CSV.  I would rather use what's out there.

:-)


On Aug 31, 2010, at 5:51 PM, Kieran Kelleher wrote:

> Does not get any simpler than apache commons lang CSV StringTokenizer.getCSVInstance() which is intelligent enough to understand Excel type CSV with delimiters when there is commas inside the token and no delimiters when there is no commas. It also escapes quotes IIRC.
>
> http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/text/StrTokenizer.html
>
> Also of relevance for CSV processing are:
>
> http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/StringEscapeUtils.html   .unescapeCsv(.....)
>
> http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/StringEscapeUtils.html   escapeCsv(....)
>
> -Kieran
>
> PS. Mike, if there was ever another generic jar that Anjo was willing to allow into ERJars it should be apache commons lang extensions. Totally useful and commonly desired extensions to the java language and saves a lot of reinventing the wheel :-)
>
> They even have something like ERXSimpleTemplateParser that uses ${argname} style variables:
> http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/text/StrSubstitutor.html
>
>
> On Aug 31, 2010, at 2:40 PM, Joe Moreno wrote:
>
>> Can anyone recommend a simple CSV file reader for WO?
>>
>> It needs to be smart enough to escape commas inside quotes, i.e.:
>> Name, Location
>> John Smith, "Cupertino, CA"
>>
>> I'm sure that this wouldn't be hard to write, but code I don't have to write is code that I don't have to debug. :^D
>>
>> Many thanks,
>> Joe
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CSV File Reader
      • From: Kieran Kelleher <email@hidden>
References: 
 >CSV File Reader (From: Joe Moreno <email@hidden>)
 >Re: CSV File Reader (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: CSV File Reader
  • Next by Date: Re: CSV File Reader
  • Previous by thread: Re: CSV File Reader
  • Next by thread: Re: CSV File Reader
  • Index(es):
    • Date
    • Thread