Now Im trying to save the workbook as an excel workbook but it saves the
file as an CSV. I want a .xlsx

So I did this:

.....
ensure
  # Save the workbook and close
  # filename is 'C:\Ruby\Lab\test.csv'

  excel.activeworkbook.SaveAs(filename.split(".").first+".xlsx")
  excel.activeworkbook.close(false)

  # Quit Excel
  excel.quit
end

This saves the file without problem but I cant open it because the file
format or the file extension is not valid. How should I save it??

Any suggestions?

Br
cristian

-- 
Posted via http://www.ruby-forum.com/.