Hi Vikash,

  You are several ways to do this depending on your particular needs, here's one, add your data directory to your load path in the script you're using:
$LOAD_PATH.unshift File.join(File.dirname(__FILE__),'..','data')

This assumes your data directory is one up from the file you're trying to access it from, change it if you're looking for something else, but this should give you the basic idea.

-Charley


On 8/5/06, VIKASH KUMAR <[EMAIL PROTECTED]> wrote:
I am loading a file by giving the absolute path, the below code works fine:
 
excel = WIN32OLE::new('excel.Application')
        
workbook = excel.Workbooks.Open ('C:\demo\mation.xls')
          worksheet = workbook.Worksheets(1)   
          worksheet.Select
          excel['Visible'] = true
 
 
I want to use the name of the file to open ' mation.xls', not the entire path 'C:\demo\mation.xls'.
 
Please send me a solution for this.
 
Thanks in advance
 
Vikash Kumar
 


Here's a new way to find what you're looking for - Yahoo! Answers


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to