Can I use ROR For my project?

Hello, I am new to ROR and was wondering if it is a viable solution to
my project.
I currently have a VB 6 application that is used to query a sql
database and then dump into an excel or pdf file. My question is, how
easy would it to be to write a web application that does the same
thing? Additionally how would I go about doing this?

This will help you with the PDFs : http://railscasts.com/episodes/78

Maybe this for CSV : http://satishonrails.wordpress.com/2007/06/28/how-to-generate-csv-files-in-rails/

I have both functionality in my app, although I do it differently.
Also, my code is in the LIB directory, not in the controller.