You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jürgen Hoffmann <jh...@byteaction.de> on 2003/04/30 10:05:31 UTC
Generate CSV File
Hi all,
Is it possible to use velocity to generate a CSV File that is wirtten to
disk rather than generating output for a webuser?
Kind regards
Jürgen Hoffmann
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generate CSV File
Posted by Frederic Gedin <fr...@Jaluna.COM>.
Well
I think, I did not chose the most simple way of doing it.
Next time I will think twice.
I have to confess that I am used to use velocity in the context of
turbine and I am a bit lazy to learn how to use velocity in standalone mode.
Regards
Frederic
James Cooper wrote:
>I've used Velocity to essentially just to pass a writer reference fill that
>writer full of data to generate a CSV file. Then once the writer is full,
>you can do what you want, and I think the code length is closer to 10 lines
>rather than 100. But there are caveats
>
>The only thing I had a problem with was CRLF's, velocity appends line
>delimiters based on the OS its running on. So when I moved it off my W2K
>workstation onto Solaris, I found the CSV files only contained LF's, so I
>just subclassed StringWriter and made sure to strip out the LF's and replace
>them with CRLF's.
>
>Pretty easy job, given a second chance to do it, I'd still go for Velocity
>rather than writing it myself.
>
>
>
>-----Original Message-----
>From: Frederic Gedin [mailto:frederic.gedin@Jaluna.COM]
>Sent: 30 April 2003 10:19
>To: Turbine Users List
>Subject: Re: Generate CSV File
>
>
>Hi Jurgen
>
>
>I had the opportunity to write an exporter in CSV format. For this, I
>dod not use velocity but write directly the CSV file. This took me no
>more than 100lines of code comments and header included.
>So I wonder if using velocity is really the right path.
>
>Frederic
>
>Jürgen Hoffmann wrote:
>
>
>
>>Hi all,
>>
>>Is it possible to use velocity to generate a CSV File that is wirtten to
>>disk rather than generating output for a webuser?
>>
>>Kind regards
>>
>>Jürgen Hoffmann
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Generate CSV File
Posted by James Cooper <ja...@maxware.nl>.
I've used Velocity to essentially just to pass a writer reference fill that
writer full of data to generate a CSV file. Then once the writer is full,
you can do what you want, and I think the code length is closer to 10 lines
rather than 100. But there are caveats
The only thing I had a problem with was CRLF's, velocity appends line
delimiters based on the OS its running on. So when I moved it off my W2K
workstation onto Solaris, I found the CSV files only contained LF's, so I
just subclassed StringWriter and made sure to strip out the LF's and replace
them with CRLF's.
Pretty easy job, given a second chance to do it, I'd still go for Velocity
rather than writing it myself.
-----Original Message-----
From: Frederic Gedin [mailto:frederic.gedin@Jaluna.COM]
Sent: 30 April 2003 10:19
To: Turbine Users List
Subject: Re: Generate CSV File
Hi Jurgen
I had the opportunity to write an exporter in CSV format. For this, I
dod not use velocity but write directly the CSV file. This took me no
more than 100lines of code comments and header included.
So I wonder if using velocity is really the right path.
Frederic
Jürgen Hoffmann wrote:
>Hi all,
>
>Is it possible to use velocity to generate a CSV File that is wirtten to
>disk rather than generating output for a webuser?
>
>Kind regards
>
>Jürgen Hoffmann
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generate CSV File
Posted by Frederic Gedin <fr...@Jaluna.COM>.
Hi Jurgen
I had the opportunity to write an exporter in CSV format. For this, I
dod not use velocity but write directly the CSV file. This took me no
more than 100lines of code comments and header included.
So I wonder if using velocity is really the right path.
Frederic
Jürgen Hoffmann wrote:
>Hi all,
>
>Is it possible to use velocity to generate a CSV File that is wirtten to
>disk rather than generating output for a webuser?
>
>Kind regards
>
>Jürgen Hoffmann
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org