I might be way off the mark here. But I did find if you don't require
automating the export to excel and if you are using rails, you could
just use a respond_to with a format.xls. You just have to specify the
mime_type (Mime::Type.register "text/html", :xls), and in the
respond_to block, do something like:

respond_to do |format|
  format.xls {
      headers['Content-Type'] = "application/vnd.ms-excel"
      headers['Content-Disposition'] = "attachment; filename='#
{filename}-#{Time.now.to_s}.xls'"
      headers['Cache-Control'] = ''
      render :action => action_name, :layout => false
  }
end

Forgive the fugly code =). In the views, just use a table with the
necessary thead and tbody... no other formatting required.

It's easier. I did find issues with the other solutions as well... and
most of users didn't mind a click to get the reports instead.

Cheers
Marc

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to