AppleScript + Excel - NEED HELP!

Discussion in 'Mac Basics and Help' started by Icculus, Jan 19, 2011.

  1. Icculus macrumors 6502

    Joined:
    Jun 2, 2007
    Location:
    Frisco, TX
    #1
    I am super new to applescript so I am very out of place right now. I have an excel file that has 12 columns and it will vary on how many rows. I am trying to find a way to copy the cell value of A2/B3/C3/etc. to variables (a few are strings but most are integers). Doing that part is pretty easy but since I need to have this be a loop and keep going until the value in column A is blank. I have spent tons of time on google trying to figure this out and got nowhere so if anyone can help me out I would really appreciate it. Thanks!
     
  2. andy 111r macrumors newbie

    andy 111r

    Joined:
    Nov 13, 2010
    Location:
    leeds
    #2
    here you go...

    Code:
    set mydata to "xx"
    set mycounter to 0
    
    tell application "Microsoft Excel"
    	repeat until mydata is equal to ""
    		set mycounter to mycounter + 1
    		set mydata to value of cell 1 of row mycounter as text
    	end repeat
    end tell
     

Share This Page