Re: Excel last cell
Re: Excel last cell
- Subject: Re: Excel last cell
- From: email@hidden
- Date: Fri, 15 Dec 2000 11:43:34 -0800
Hello,
I have more experience with Excel than with Applescript but here's my $.02.
I take it you are importing the text file into Excel then trying to
determine the number of used cells.
I read in the Quickstart guide "Applescript and the Internet" that you can
use applescript with the vba code that works with excel/word and the other
office products.
I haven't been able to get my copy back but I believe the syntax goes
something like this:
(If I ever get the book back, I'll send a working version)
tell application "Microsoft Excel"
do Visual Basic
Range("a1").select
dim NumRows as integer
NumRows = Activecell.CurrentRegion.Rows.Count
end tell
this code won't work, but hopefully it will give you another perspective
from which you can work.
I'll try to figure out something better over the weekend if I can. :-)
Joan
At 03:52 PM 12/13/00 +0000, you wrote:
I am having problems getting the last cell of a large imported text file
in Excel (by large I mean roughly 1000 rows by 18 columns so not
massive). I found this script below by Carol Ellis dated Mon, 12 Apr
1999 on the archives which works fine on my text files as long as they are
below 300 rows. With anything larger i get an error saying "unable to get
length of 0". I presume that the line "set theSelection to FormulaR1C1 of
theRange" is unable to process the large amount of data and just returns
"0". Is there any other way to get the number of used rows as I can't
seem to find one and I'm getting quite frustrated now. The Text file is a
log report from a Splash RIP that I am trying to filter out data into a
new excel sheet. Also what exactly is the definition of the FormulaR1C1
property as I can't find any documentation on the Excel dictionary.