Displaying 1 result from an estimated 1 matches for "item_list_as_spreadsheet".
2007 Jan 11
0
Functional tests with actions that send files
...nal test? Can the data be accessed using the
response object somehow? I''ve tried poking around at the response
object, but haven''t really gotten anywhere with it.
Here''s the code, if it makes a difference:
--------------------------------------------------
action:
def item_list_as_spreadsheet
filepath = "tmp/items.xls"
workbook = Excel.new(filepath)
# details of writing data to the spreadsheet omitted for space
reasons
workbook.close
send_file filepath, :filename => ''Item List.xls'', :type =>
''application/vnd.ms-excel'...