Connecting Tech Pros Worldwide Help | Site Map

Validation of excel file in Ruby

  #1  
Old April 10th, 2009, 06:26 AM
Newbie
 
Join Date: Oct 2007
Posts: 19
Hello all,
My problem is, for uploading an excel file(.xls file), if i change .txt or any other format file into .xls file, i should be able to handle this and display an error message saying "file selected is not a format" in ruby.Or is there any way that can be done through javascript.Please help me.Its urgent.

Thanks,
amulyab
  #2  
Old April 11th, 2009, 05:13 PM
Expert
 
Join Date: May 2007
Posts: 213

re: Validation of excel file in Ruby


I'm not sure I understand. Do you just need to check the file extension (.xls, .txt, etc) or the file contents? If you need to check contents, you might be able to use win32ole.
Reply