ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Applescript Problem (https://www.excelbanter.com/excel-programming/286974-applescript-problem.html)

Alex Sossick

Applescript Problem
 
Hi All

Well this is not directly relevant but I thought someone might have an idea

I am trying to create an applescript to control excel and run excel macros
on my OSX mac.

I have my macro in excel and it works, but I want to open text files that
are not from a mac or excel formatted, so in the applescript I have tried

OpenText theFile SpaceDelimiter space

And

OpenText theFile Origin xlMSDOS StartAtRow 1 DataType xlDelimited
SpaceDelimiter tab with TreatConsecutiveDelimitersAsOne

And variations on the theme, I am defining the file to open as theFile
Any ideas why this does not work


thanks
Alex



tell application "Microsoft Excel"
OpenText theFile SpaceDelimiter space
Evaluate "'Personal Macro Workbook'!Script1()"
end tell



All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com