title: spreadsheet Rails 3 question
body: <p>I have upgraded my rails 2.3.10 application into Rails 3.0.3. In my application i have the feature like user can download the data into excel. </p>
  
  <p>My gem version : spreadsheet-0.6.4.1 </p>
  
  <p>I have declared gem version in Gemfile and   Mime::Type.register_alias "application/excel", :xls in application.rb.  and my excel generationg code as follows </p>
  
  <pre><code>&lt;%
  
  book = Spreadsheet::Workbook.new
   data = book.create_worksheet :name =&gt; 'myname'
   data.row(0).concat %w{name email}
   header_format = Spreadsheet::Format.new :color =&gt; :green, :weight =&gt; :bold
   data.row(0).default_format = header_format
  
  @names.results_data.each_with_index { |n, i|
  
  data.row(i+1).push n.name,n.email
  }
  
  blob = StringIO.new('')
  book.write(file_blob)
  -%&gt;&lt;%=blob.string%&gt;
  </code></pre>
  
  <p>My controller code is : </p>
  
  <pre><code>respond_to do |format|
        format.html
        format.rss
        format.xls {    
          view_output = render_to_string :action =&gt; "excel" &lt;&lt; name
          send_data(view_output, :type=&gt;"application/ms-excel", :filename =&gt; "name.xls")
        }
  </code></pre>
  
  <p>The problem is when click the excel link , it open up the excel window and its says in the popup 'name.xls[2] cann't be access. may be corrupted or read only ... i have changed all the possibilites like gem upgrade, mime-type change but no luck... </p>
  
  <p>Can any one say what is the error</p>