Excel

Can anyone help me ???

I want to export some data into MS excel and create a pie or line chart.
How can I export the data? Does it gives any tutorial websites ?

thanks for your help!

MS Excel can import cvs

1,3,5\n
“foo”,“bar”,“foo bar”\n

See my plugin:

http://www.napcsweb.com/blog/2006/02/10/excel-plugin-10/

Pretty easy to use actually.

def export_project_to_excel
e = Excel::Workbook
@project = Project.find(:all)
@tasks = @project.tasks

ActiveRecord worksheets need a tab name, the object type, and the

collection
e.addWorksheetFromActiveRecord “Project”, “project”, @project
e.addWorksheetFromActiveRecord “Tasks”, “task”, @tasks
headers[‘Content-Type’] = “application/vnd.ms-excel”
render_text(e.build)
end

or the advanced mode

def export_book_info_to_excel
books = Book.find(:all)
my_array = Array.new
for book in books
item = Hash.new
item[“Title”] = book.title
item[“ISBN”] = book.isbn
item[“Author”] = book.author.last_name
item[“Category”] = book.category.name
item[“Total Sales”] = book.sales.size
my_array << item
end
addWorksheetFromArrayOfHashes(“Books info”, my_array)
headers[‘Content-Type’] = “application/vnd.ms-excel”
render_text(e.build)
end

Mat S. wrote:

On Aug 7, 2006, at 8:19 AM, Marcel Hellkamp wrote:

MS Excel can import cvs

1,3,5\n
“foo”,“bar”,“foo bar”\n

It can also import an HTML table fragment, although the borders come
out looking a little funny.
just start with

and go from there.
-Mat

And how can I generate charts in excel ?

On Aug 7, 2006, at 8:19 AM, Marcel Hellkamp wrote:

MS Excel can import cvs

1,3,5\n
“foo”,“bar”,“foo bar”\n

It can also import an HTML table fragment, although the borders come
out looking a little funny.
just start with

and go from there.
-Mat

Here’s a tutorial for you:
http://www.ehow.com/how_2053342_create-pie-chart-excel.html


Best regards.
http://www.keepdynamic.com/