Guest User

Untitled

a guest
Mar 22nd, 2022
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. tell application "Numbers"
  2.  
  3. tell front document to tell active sheet
  4.  
  5. tell (first table whose selection range's class is range)
  6.  
  7. set chartTitle to name
  8.  
  9. set colNames to (row 1's cells 2 thru -1)'s value
  10.  
  11. set rowNames to (column 1's cells 2 thru -1)'s value
  12.  
  13. set chartData to (rows 2 thru -1)'s (cells 2 thru -1)'s value
  14.  
  15. end tell
  16.  
  17. end tell
  18.  
  19. end tell
  20.  
  21.  
  22.  
  23. tell application "Keynote"
  24.  
  25.  
  26. activate
  27.  
  28. tell front document's current slide
  29.  
  30. set default title item'sobject text to chartTitle
  31.  
  32. if existschart 1 then deletechart 1
  33.  
  34.  
  35. add chartrow namesrowNamescolumn namescolNames ¬
  36.  
  37.  
  38. datachartDatatypevertical_bar_2dgroup bychart row
  39.  
  40. end tell
  41.  
  42. end tell
Advertisement
Add Comment
Please, Sign In to add comment