• 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
Excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excel


  • Subject: Excel
  • From: Deivy Marck Petrescu <email@hidden>
  • Date: Sun, 8 Feb 2009 11:37:06 -0500

I am scripting Excel X. 
I understand that it is an old version but it does what I need.
There are some quirks with it and I'd like to know if these problems are still there in the new versions.

Problem 1:

Have an open Excel document.
The following script will not do what one expects:

---
Tell app "Microsoft Excel"
set value of Cell "A1" to 1 --sets value of cell a1 to 1
set value of Cell "B1" to 2 --sets value of cell b1 to 2
set value of Cell "C1" to 3 --sets value of every cell of column 1 to 3
end tell
--

Problem 2:
This one I can not really understand

---
set AC84 to (ASCII character (84))
set AC85 to (ASCII character (85))
set part1 to "(RC[-1]," & (AC84 & "2:" & AC85 & "6") & "," & (AC85 & "2:" & AC85 & "6)")
set part1 to (part1 as string)
--return (part1)
tell application "Microsoft Excel" to set Value of Cell "S3" to "=Lookup" & part1
--->=LOOKUP(R3,'T2':'U6','U2':'U6')
---

---
set AC84 to (ASCII character (84))
set AC85 to (ASCII character (85))
set part1 to "(RC[-1]," & (AC84 & "2:" & AC85 & "6") & "," & (AC85 & "2:" & AC85 & "6)")
set part1 to (part1 as string)
return (part1)
tell application "Microsoft Excel" to set Value of Cell "S3" to "=Lookup" & part1

-->"(RC[-1],T2:U6,U2:U6)"
---


So, if I check to see what is part1, I see from the script above that it is what I want, but when excel puts the formula in the cell it puts single quotes around the cell references!!!!
I have no clue on what is going on!

Any help or info on the new versions would be very appreciated.

Thanks.

Deivy Petrescu
email@hidden



 _______________________________________________
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

  • Follow-Ups:
    • Re: Excel
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: compare file icons or icon properties
  • Next by Date: Re: Excel
  • Previous by thread: Re: Can menu extra applications be scripted?
  • Next by thread: Re: Excel
  • Index(es):
    • Date
    • Thread