From: Nathan Smith Date: 2006-12-16T07:53:42+09:00 Subject: Re: EXCEL Ruby not working ------=_Part_152037_2033897.1166223219552 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline The 2 working ways I've found to open/save files look like this: x.workbooks.open(Dir.getwd + "/file.xls") # Note the / before the file name or x.workbooks.open("C:\\ruby\\files\\spreadheets\\file.xls") # Note the escaped \'s So you'll probably be able to use something like that. Thanks, Nate On 12/15/06, Tim Pease wrote: > > On 12/15/06, ChrisH wrote: > > > > anon1m0us wrote: > > > I get a file name in the directory and modify the cells with making > > > bold etc. > > > when excel.visible=TRUE it works. However, when excel.visible=FALSE > > > nothing happens. > > > Why? > > ... > > > > Tried your code and it seems that 'Save as...' is putting the saved > > file into 'My Documents' rather than overwriting the original (which is > > in the same dir as where I saved your code into a file). > > > > I have run into trouble in the past using relative pathnames for MS > Office files (open, saving). Try using an absolute pathname when you > (a) open the file and (b) save the file. That should put it in the > correct location. > > Blessings, > TwP > > ------=_Part_152037_2033897.1166223219552--