[Wtr-general] problem in opening a file

Jeff Wood jeff at dark-light.com
Mon Aug 21 13:03:11 EDT 2006


Bret Pettichord wrote:
> Zeljko Filipin wrote:
>   
>> Or you could put path to a variable
>>
>> path = "C:\demo\"
>> workbook = excel.Workbooks.Open ("#{path}mation.xls")
>>
>>     
> This won't work. Backslashes inside double-quotes have special meaning. 
> Either use forward slashes or single-quotes (or both) to avoid this problem.
>
> Bret
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>   
Or just double up on your slashes...

path = "C:\\demo\\"

should work.

jd.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060821/7e7444ef/attachment.html 


More information about the Wtr-general mailing list