Hi, How about using SetFile (installed by the developer tools) to set the creator and file type to excel, and then using the open command?
enrique on 9/8/02 7:57 AM, John Delacour at [EMAIL PROTECTED] wrote: > This script opens a text file in Excel (in my case a Classic app). > Is there any way to do the same thing without a hard-code pathname > for Excel and without Apple Events? > > > #!/usr/bin/perl > $dir = "$ENV{HOME}" ; > $xl = `osascript -e ' > tell app "Finder" to "" & «class appf» id "XCEL" > POSIX path of result'` ; chomp $xl ; > $xl = "'$xl'" ; > $fout = "$dir/junk.txt" ; > open FOUT, ">$fout" ; > print FOUT "A\t1\rB\t2" ; > close FOUT ; > `open -a $xl $fout` ; > > JD -- Enrique Terrazas, MD, MS Director, Laboratory Medicine Residency Program, Assistant Clinical Professor of Clinical Lab Medicine University of California, San Francisco Room L-521B, Box 0134 415.353.1375(phone) 415.353.1804(fax) [EMAIL PROTECTED]