Are you sure the exact same code worked under Mac OS 9.x?
Looking at the Excel dictionary, I see:
OpenText: Open an object
OpenText reference -- file to open
[Origin xlMacintosh/xlWindows/xlMSDOS] -- where file was created
[StartAtRow integer] -- row to start importing a text file at
blah, blah, blah
where the first parameter is a reference to the file to open.
In your case you’ve just passed it a string. There is no direct relationship between a string and a file unless you create one.
This code did work before I ported it to OS X. I was using OS 9.2.2 and Office 2001 SR1.
Once things stopped working under OS X, I tried casting the file name as a ‘string’ and as ‘text’. I also tried sending it as a ‘file’ reference or ‘alias’. None of these work. They all result in exactly the same error.
The error indicates the ‘OpenText’ AppleEvent is being sent to the file itself.
Microsoft Excel got an error: “Mobile Bug Data:Users:img_meister:Public:ROS_107_20011112e_DATA.txt” doesn’t understand the OpenText message
I’m not sure why this would be. The syntax is literally cut-and-pasted straight from the dictionary.