• 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
AppleScript and Excel VBA returning different values for particular column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript and Excel VBA returning different values for particular column


  • Subject: AppleScript and Excel VBA returning different values for particular column
  • From: Wesley Furgiuele <email@hidden>
  • Date: Fri, 21 Mar 2003 15:33:06 -0500

I have an Excel spreadsheet, MS Excel x.V, updated with the latest (10.1.3) MS updater. I am using Script Editor v2.0, although I tried this in 1.9. I'm on OS X 10.2.4. When I get the value of a cell using VBA, I get the correct value. When I get the value of the same cell using AppleScript, I get 0. This happens for the entire column actually.

I create a new spreadsheet. The first row is a header or label row. The rest of the sheet contains the actual data (400 records). Here are the values for the first 4 columns in the first row (in parenthesis is a sample of the data (non-header row data) found in the rest of the column).
Cell : Value (Sample Data in Column)
A1: Name (Apple Computer Inc.)
B1: CUSIP (037833100)
C1: Ticker (AAPL)
D1: Sector (Information Technology)

Using the Visual Basic editor in MS Excel,
Range("A1").Value --> Name
Range("B1").Value --> CUSIP
Range("C1").Value --> Ticker
Range("D1").Value --> Sector

Using AppleScript,
set wksA1 to Value of Range("A1") --> Name
set wksB1 to Value of Range("B1") --> CUSIP
set wksC1 to Value of Range("C1") --> 0
set wksD1 to Value of Range("D1") --> Sector

What's going on with Column C? I get 0 for the value all the way down the column, not just in the first row? The column is formatted as type "General" in Excel. This happens whether I use Range or Cell in the AppleScript. Any possibilities would be most appreciated!

Wes
_______________________________________________
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.

  • Follow-Ups:
    • Re: AppleScript and Excel VBA returning different values for particular column
      • From: David Wignall <email@hidden>
  • Prev by Date: Re: Newbie Help
  • Next by Date: Re: Sine of the times: Much better window shaker
  • Previous by thread: Re: Slightly OT re: Entourage X
  • Next by thread: Re: AppleScript and Excel VBA returning different values for particular column
  • Index(es):
    • Date
    • Thread