From: David Mullet Date: 2009-12-14T00:15:05+09:00 Subject: Re: Access Excel W. James wrote: > > This is a good place to talk about slashes in paths under windoze. > Good point. > If you think you have to use back-slashes, they must be escaped within > double quotes: > > "C:\\Path To File\\MyWorkbook.xls" ...or enclosed within single (not double) quotes: xl = WIN32OLE.connect('C:\Path To File\MyWorkbook.xls').Application Sorry, I should have drawn special attention to that in my original reply. > > Windoze itself recognizes forward slashes. > Be careful, though, as Excel does not recognize forward slashes in the path. So, for example, this SaveAs() method (where wb is your Workbook object) would fail... wb.SaveAs("C:/Path To File/MyWorkbook.xls") ...but these versions would work: wb.SaveAs("C:\\Path To File\\MyWorkbook.xls") wb.SaveAs('C:\Path To File\MyWorkbook.xls') David http://rubyonwindows.blogspot.com/ -- Posted via http://www.ruby-forum.com/.