Re: beginner's Excel script (round2)
Re: beginner's Excel script (round2)
- Subject: Re: beginner's Excel script (round2)
- From: Bill Metzinger <email@hidden>
- Date: Sun, 28 Mar 2004 20:43:57 -0500
>
The goal of my script is to pile into one Excel file many columns of
>
X,Y numerical data (for later importing into my graphing program) from
>
a whole bunch of text files that Excel is capable of opening directly.
>
I simply dont know enough yet to script everything I want to happen in
>
my first attempt; So I'll settle for a very whimpy script that will do
>
*something* to minimize the boring repetition, then improve it later.
>
I began by using recordability to learn how to talk to Excel, and
>
basically tried to make my script exactly mimic the UI steps I would
>
have taken to do this manually.
I could help you do anything with Excel if I understood more of your
problem.
I saw some of your script last week.
Opening the text files in Excel and copy pasting is slow and lumpy.
You can read it's contents into a variable.
Also you don't need to select cells and then fill the active cell.
Just tell the cell's formula to be something.
set myVar to read file (((path to desktop folder) as text) & "mytxt")
as string
tell application "Microsoft Excel"
Create New Workbook
set r to 7
repeat with l from 1 to count items of myVar
set Formula of Cell ("R" & r & "C3") to item l of myVar
set r to r + 1
end repeat
end tell
.DS_Bill
} No one enjoys a good laugh more than I do.
} Except perhaps for my wife and some of her friends.
} Oh, yes, and Captain Johnson.
} Come to think of it, most people enjoy a good laugh
} more than I do, but that's beside the point.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.