# FasterCSV (faster\_csv) and Question of understanding

**URL:** <https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084>\
**Category:** Ruby\
**Created:** [September 7, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084 "2009-09-07T17:06:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![baiki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@baiki](https://www.ruby-forum.com/u/baiki)\
**Post date:** [September 7, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084/1 "2009-09-07T17:06:33Z")

</div>

Dear Experts,

I got a question for you: I need to produce a Ruby code which does the  
following:

1. I get a CSV file (more or less like this:  
name,id,in,out,ot,ab,x1,x2,x3,x4)
2. I need to remove some columns (like the x1…x3)
3. I need to group them per user (in this case either name or id)
4. I need to add columns like salary (which I have to calculate first)
5. I need to add a row with the monthly salary
6. and… a PDF to print this correctly

And now? Ruby + FasterCSV + ???PDF???

Please, do not come up with Ruport because I tried this for 7 days now.  
success = 0

Are there better solutions (please no Jasper, OpenRPT etc.)

Regards,  
Baiki

---

<div class="post-metadata">

**Author:** ![baiki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@baiki](https://www.ruby-forum.com/u/baiki)\
**Post date:** [September 7, 2009, 7:02pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084/2 "2009-09-07T19:02:04Z")

</div>

On Sep 7, 2009, at 10:06 AM, Dot Baiki wrote:

> And now? Ruby + FasterCSV + ???PDF???

FasterCSV can definitely help you read an manipulate the data as you  
have described.

> Please, do not come up with Ruport because I tried this for 7 days  
> now.  
> success = 0

Have your tried handling the PDF generation using Prawn  
([http://prawn.majesticseacreature.com/](http://prawn.majesticseacreature.com/)  
)? Hopefully it can do what you need.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![baiki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@baiki](https://www.ruby-forum.com/u/baiki)\
**Post date:** [September 7, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084/3 "2009-09-07T20:49:47Z")

</div>

Dot Baiki wrote:

> 1. I need to add a row with the monthly salary  
> Baiki

I wrote a CSV-handling library for similar purposes (e.g. grouping,  
[extcsv.rubyforge.org](http://extcsv.rubyforge.org)). Maybe it’s helpfull.  
In case you use it and run into problems, drop me a line.

regards  
Ralf

---

<div class="post-metadata">

**Author:** ![baiki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@baiki](https://www.ruby-forum.com/u/baiki)\
**Post date:** [September 8, 2009, 1:54pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084/4 "2009-09-08T13:54:36Z")

</div>

James Edward G. II wrote:

> On Sep 7, 2009, at 10:06 AM, Dot Baiki wrote:
> 
> > And now? Ruby + FasterCSV + ???PDF???
> 
> FasterCSV can definitely help you read an manipulate the data as you  
> have described.
> 
> > Please, do not come up with Ruport because I tried this for 7 days  
> > now.  
> > success = 0
> 
> Have your tried handling the PDF generation using Prawn  
> ([http://prawn.majesticseacreature.com/](http://prawn.majesticseacreature.com/)  
> )? Hopefully it can do what you need.
> 
> James Edward G. II

OK, seems like I don’t have to buy Crystal Reports (hi hi hi hi). I have  
downloaded Prawn and will start to play around (or mess around?) with  
today 🙂

However, thanks for this nice piece of software and advice! Brilliant!

Greetings from West Africa  
.baiki

---

<div class="post-metadata">

**Author:** ![baiki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@baiki](https://www.ruby-forum.com/u/baiki)\
**Post date:** [September 8, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084/5 "2009-09-08T14:03:57Z")

</div>

Ralf M. wrote:

> Dot Baiki wrote:
> 
> > 1. I need to add a row with the monthly salary  
> > Baiki
> 
> I wrote a CSV-handling library for similar purposes (e.g. grouping,  
> [extcsv.rubyforge.org](http://extcsv.rubyforge.org)). Maybe it’s helpfull.  
> In case you use it and run into problems, drop me a line.
> 
> regards  
> Ralf

HallÃ¶chen and hello Ralf

Great, thanks a lot! Just visited your page and I definitely have to  
consider your solution as well. Since I am a bloody beginner, it’ll take  
a decade to really understand everything but it’s worth it 🙂

Thanks so much!

Greetings from West Africa  
.baiki

---

<div class="post-metadata">

**Author:** ![baiki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@baiki](https://www.ruby-forum.com/u/baiki)\
**Post date:** [September 9, 2009, 2:47pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084/6 "2009-09-09T14:47:55Z")

</div>

Dot Baiki wrote:

> James Edward G. II wrote:
> 
> > On Sep 7, 2009, at 10:06 AM, Dot Baiki wrote:
> > 
> > > And now? Ruby + FasterCSV + ???PDF???
> > 
> > FasterCSV can definitely help you read an manipulate the data as you  
> > have described.
> > 
> > > Please, do not come up with Ruport because I tried this for 7 days  
> > > now.  
> > > success = 0
> > 
> > Have your tried handling the PDF generation using Prawn  
> > ([http://prawn.majesticseacreature.com/](http://prawn.majesticseacreature.com/)  
> > )? Hopefully it can do what you need.
> > 
> > James Edward G. II
> 
> OK, seems like I don’t have to buy Crystal Reports (hi hi hi hi). I have  
> downloaded Prawn and will start to play around (or mess around?) with  
> today 🙂
> 
> However, thanks for this nice piece of software and advice! Brilliant!
> 
> Greetings from West Africa  
> .baiki

Hello Sir James Edward G. II,

Well, now I know who I am talking to 🙂 Respect! However, I checked all  
the suggestions: Ruport, Ruby, CSV, fastercsv, prawn, extcvs.

All so beautiful. However, right now I have at least three lines in my  
code  
#!/usr/bin/ruby  
require ‘rubygems’  
require ‘ruport’

Hope I go in the right direction. Let you know when I have success (or  
questions).

Greetings

---

<div class="post-metadata">

**Author:** ![baiki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/4af34b/32.png) [@baiki](https://www.ruby-forum.com/u/baiki)\
**Post date:** [September 10, 2009, 3:54pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084/7 "2009-09-10T15:54:35Z")

</div>

I close the thread here. Will post new one: Ruport for Beginner

Thanks.  
Baiki
