Hai friends, How to fetch an excel sheet name in ruby...
on 2009-02-24 05:58
on 2009-02-24 06:06
Deepa Rajendran wrote: > Hai friends, > How to fetch an excel sheet name in ruby... gem install spreadsheet Regards, Dan
on 2009-02-24 07:05
Dan, Thanks...... I installed spreadsheet. My concept is. I download the .xls attachment file from my inbox,but i need to fetch the excel sheet name through ruby coding.Could you plz help me.
on 2009-02-24 08:13
2009/2/24 Deepa Rajendran <firstname.lastname@example.org>: > Hai friends, > Â Â Â Â Â How to fetch an excel sheet name in ruby... You can do it using win32ole like this: require 'win32ole' xl = WIN32OLE.new('Excel.Application') wb = xl.Workbooks.Open("c:/work/test.xls") ws = wb.Worksheets(1) puts ws.Name wb.Close xl.Quit Regards, Park Heesob
on 2009-02-24 09:17
On Tue, Feb 24, 2009 at 8:11 AM, Heesob Park <email@example.com> wrote: > ws = wb.Worksheets(1) > puts ws.Name > wb.Close > xl.Quit ... and in Spreadsheet: book = Spreadsheet.open("/path/to/xls") sheet = book.worksheets.first puts sheet.name see also: http://spreadsheet.rubyforge.org http://spreadsheet.rubyforge.org/files/GUIDE_txt.html http://spreadsheet.rubyforge.org/classes/Spreadshe... hth cheers, Hannes