You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Reyes <ri...@gmail.com> on 2005/08/19 18:01:53 UTC
[OT] How to load a csv file into java
Hi Guys,
I need to load exported information ( csv file ) into POJOs. How do I do this?
Thanks
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] How to load a csv file into java
Posted by Dave Newton <ne...@pingsite.com>.
Richard Reyes wrote:
>Hi All,
>
>Thanks for the response. I think I can use this...
>
>http://ostermiller.org/utils/CSV.html
>
>
It mostly works; I vaguely recall having to tweak it a bit, but nothing
serious.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] How to load a csv file into java
Posted by Joe Germuska <Jo...@Germuska.com>.
At 12:12 AM +0800 8/20/05, Richard Reyes wrote:
>Hi All,
>
>Thanks for the response. I think I can use this...
>
>http://ostermiller.org/utils/CSV.html
I've had good results with this library. Despite
what some posters have indicated, if you're
talking about true CSV as exported from Excel,
for example, it's not as simple as splitting on
commas. There are rules about quoted values and
the case of empty columns which make reading in
CSV hard enough that there's no reason to
reinvent the wheel when Mr. Ostermiller has gone
to so much trouble.
The only issue would be if you can't deal with
the GPL license. As long as you're not planning
on redistributing your app, that's unlikely to be
an issue.
Joe
>What do guys think?
>
>On 8/20/05, Stéphane Zuckerman <st...@gmail.com> wrote:
>> Hi Richard,
>>
>>
>> > I need to load exported information ( csv
>>file ) into POJOs. How do I do this?
>>
>> Well, just use the <html:file/> tag (and don't forget tu use the correct
>> attributes in your <html:form/> tag). Then converting your CSV
>> file'll only be a matter of split()ing the resulting data... Well, more
>> or less ;-)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] How to load a csv file into java
Posted by Richard Reyes <ri...@gmail.com>.
Hi All,
Thanks for the response. I think I can use this...
http://ostermiller.org/utils/CSV.html
What do guys think?
On 8/20/05, Stéphane Zuckerman <st...@gmail.com> wrote:
> Hi Richard,
>
>
> > I need to load exported information ( csv file ) into POJOs. How do I do this?
>
> Well, just use the <html:file/> tag (and don't forget tu use the correct
> attributes in your <html:form/> tag). Then converting your CSV
> file'll only be a matter of split()ing the resulting data... Well, more
> or less ;-)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] How to load a csv file into java
Posted by Stéphane Zuckerman <st...@gmail.com>.
Hi Richard,
> I need to load exported information ( csv file ) into POJOs. How do I do this?
Well, just use the <html:file/> tag (and don't forget tu use the correct
attributes in your <html:form/> tag). Then converting your CSV
file'll only be a matter of split()ing the resulting data... Well, more
or less ;-)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] How to load a csv file into java
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Richard Reyes" <ri...@gmail.com>
> I need to load exported information ( csv file ) into POJOs. How do I do
> this?
Check the archives of commons-user and commons-dev; there have been recent
discussions about a Jakarta Commons CSV component.
There were links to several existing libraries, one of which I think might
be coming through the incubator. At least, I think I remember someone
mentioning writing a proposal, though I'm not sure how far it's gotten. One
of those links will probably be something you can use.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] How to load a csv file into java
Posted by DG...@EvergreenInvestments.com.
Lesson: I/O: Reading and Writing (but no 'rithmetic)
http://java.sun.com/docs/books/tutorial/essential/io/
-Dennis
Richard Reyes <ri...@gmail.com>
08/19/2005 12:01 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
Struts Users Mailing List <us...@struts.apache.org>
cc
Subject
[OT] How to load a csv file into java
Hi Guys,
I need to load exported information ( csv file ) into POJOs. How do I do
this?
Thanks
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org