data to excel

Liam Lambert liamlambert at mac.com
Mon Feb 12 16:08:18 EST 2007


I am trying to enter some data into excel using Ken Ray's code.
I want to put the data into columns  A1,B1  (the number for each row  
is entered in field "Nub")


ON mouseUp
     put "A,B,C,D,E" INTO tAlph
     REPEAT for each item tLett in tAlph
     put tLett before fld "Nub"
     put fld "Nub" into tNub
      SendToXL "99",tNub
     delete char 1 of fld "Nub"
     END REPEAT
END mouseUp

ON SendToXL pWhat,pCell
   put "tell app" && q("Microsoft Excel") & cr & \
     "set value of cell" && q(pCell) && "to" && q(pWhat) & cr & \
     "end tell" into tScript
   do tScript as AppleScript
END SendToXL

FUNCTION q pWhat
   return quote & pWhat & quote
END q

Thanks'

  Liam

IRELAND
liamlambert at mac.com






More information about the use-livecode mailing list