Re: [Wtr-general] Formatting Excel Column Width

2006-09-27 Thread Sun
Thank you. So I did access the link, download the extended MS help, and accessed VBAXL10.CHM. I found a method called AutoFit. === #Format workbook columns worksheet.range(b1:b4).Interior['ColorIndex'] = 36 #pale yellow worksheet.range(b:b).AutoFit === However, because I was originally working

Re: [Wtr-general] Formatting Excel Column Width

2006-09-26 Thread Sun
Sun wrote: So I can open the csv file as an Excel file and make a format change (turn the 2nd column yellow.) But -- I cannot find anywhere, on any forum, or the Ruby online documentation, how to autofit the column to the text. Chris Morris has a link in the RubyGarden page that has

Re: [Wtr-general] Formatting Excel Column Width

2006-09-26 Thread Bret Pettichord
On 9/26/06, Sun [EMAIL PROTECTED] wrote: Do you mean this link here?: http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcelBut in fact it does not provide that information.As for the Excel method, if you did it manually it would be Format/Column/Autofit Selection Yes. This is what i meant: You

Re: [Wtr-general] Formatting Excel Column Width

2006-09-24 Thread Michael Bolton
excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open(../PC/ + Time.now.strftime(%d-%b-%y) + .csv) worksheet = workbook.Worksheets(1) #get hold of the first worksheet #Format workbook columns worksheet.range(b1:b4).Interior['ColorIndex'] = 36 #pale yellow # How do I widen the

[Wtr-general] Formatting Excel Column Width

2006-09-22 Thread Sun
Technically this is a Ruby question but...since it is useful to record test run timing information in Excel format, I think it is relevant to this forum. The question is...suppose I write out some test output that looks like this: === Test, Acceptable log in time, 5, Actual time to log