Hai friends, How to fetch an excel sheet name in ruby...
on 2009-02-24 06:58
on 2009-02-24 07:06
Deepa R. wrote: > Hai friends, > How to fetch an excel sheet name in ruby... gem install spreadsheet Regards, Dan
on 2009-02-24 08: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 09:13
2009/2/24 Deepa R. <email@example.com>: > 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 H.
on 2009-02-24 10:17
On Tue, Feb 24, 2009 at 8:11 AM, Heesob P. <firstname.lastname@example.org> 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