One way to do it, once you identify your instance of Excel, say, as "myExcel", 
you can modify them as such: (note that the numbers correspond to the workbook 
number, determined by the order it was created / opened and the actual 
worksheet tab at the bottom, respectively, which Excel considers a collection, 
one-based)

myExcel = WIN32OLE::new( "Excel.Application" )
myExcel.Workbooks.Open( myFilePath + myInputFileName )
myExcel.Workbooks( 1 ).Worksheets( 1 ).name = "Custom Sheet Name"

Deleting them like this if you want:
@@ExcelOutput.Workbooks( 1 ).Worksheets( 3 ).delete()

There is no WIN32API method for simultanesouly creating and naming a new 
worksheet.

Hope this helps,
Nathan Christie
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18339#18339
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to