Connecting Tech Pros Worldwide Forums | Help | Site Map

Validation of excel file in Ruby

Newbie
 
Join Date: Oct 2007
Posts: 19
#1: Apr 10 '09
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

Expert
 
Join Date: May 2007
Posts: 213
#2: Apr 11 '09

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