identify open workbook in excel?

B

Bulhac Mihai

-i have an excel file ex.xls open;
-can i make a script that will search all opened excel files and if an
excel file is ex.xls then ex.xls it will be memorized in an ruby
variable? how can i do that?

tbx
 
D

David Mullet

Bulhac said:
-i have an excel file ex.xls open;
-can i make a script that will search all opened excel files and if an
excel file is ex.xls then ex.xls it will be memorized in an ruby
variable? how can i do that?

tbx

require 'win32ole'

# Connect to a running instance of Excel:
excel = WIN32OLE.connect('Excel.Application')

# Select your workbook by name from the Workbooks collection:
my_workbook = excel.Workbooks('ex.xls')

Further discussion here:
http://rubyonwindows.blogspot.com/search/label/excel

David

http://rubyonwindows.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,270
Messages
2,571,352
Members
48,037
Latest member
BettinaArn

Latest Threads

Top