• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AS and Excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS and Excel


  • Subject: Re: AS and Excel
  • From: Thomas Fischer <email@hidden>
  • Date: Wed, 21 Aug 2013 17:56:35 +0200

Hello Willard,

yes, 

set theLastRow to first row index of (last cell of used range)

gives a convenient upper bound for the cells to look at, this is a useful information I wasn't aware of.

"string value" may be somewhat safer then "value", and getting rid of empty strings by setting them to false works nicely too!

Best
Thomas

Am 21.08.2013 um 14:02 schrieb Willard L. McMunn:

Try this:

tell application "Microsoft Excel"
tell active workbook
tell active sheet
set theLastRow to first row index of (last cell of used range)
tell range ("A1:A" & theLastRow)
set theResult to string value of every cell
repeat with jItem from 1 to count theResult
if item jItem of theResult = "" then
set item jItem of theResult to false
end if
end repeat
set theResult to strings of theResult
end tell
end tell
end tell
end tell



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: AS and Excel (From: "Willard L. McMunn" <email@hidden>)

  • Prev by Date: Re: AS and Excel
  • Next by Date: Re: AS and Excel
  • Previous by thread: Re: AS and Excel
  • Next by thread: Font book scripts in 10.8.x? Is this another sandboxing issue?
  • Index(es):
    • Date
    • Thread