Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Apps and Programs
Automating Keynote - update Chart data
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="omarko" data-source="post: 1930447" data-attributes="member: 418016"><p>I have a Keynote file that has multiple Charts on multiple slides. I'm seeking a way to update the Chart data in an automated way (AppleScript perhaps)? I found some AppleScript examples online, but they don't seem to work in the current version of AppleScript. Is anyone aware of a method for accomplishing this today? </p><p>Here's an example:</p><p></p><p style="margin-left: 20px">tell application "Keynote"</p> <p style="margin-left: 20px"> set theCSVFile to choose file with prompt "Select the CSV file containing the chart data:"</p> <p style="margin-left: 20px"> set theChartData to paragraphs of (read theCSVFile)</p> <p style="margin-left: 20px"> </p> <p style="margin-left: 20px"> -- get the chart on the second slide</p> <p style="margin-left: 20px"> set theSecondSlide to slide 2 of front document</p> <p style="margin-left: 20px"> set theChart to chart 1 of theSecondSlide</p> <p style="margin-left: 20px"> </p> <p style="margin-left: 20px"> -- update the chart data</p> <p style="margin-left: 20px"> set the data of theChart to theChartData</p> <p style="margin-left: 20px">end tell</p></blockquote><p></p>
[QUOTE="omarko, post: 1930447, member: 418016"] I have a Keynote file that has multiple Charts on multiple slides. I'm seeking a way to update the Chart data in an automated way (AppleScript perhaps)? I found some AppleScript examples online, but they don't seem to work in the current version of AppleScript. Is anyone aware of a method for accomplishing this today? Here's an example: [INDENT]tell application "Keynote"[/INDENT] [INDENT] set theCSVFile to choose file with prompt "Select the CSV file containing the chart data:"[/INDENT] [INDENT] set theChartData to paragraphs of (read theCSVFile)[/INDENT] [INDENT] [/INDENT] [INDENT] -- get the chart on the second slide[/INDENT] [INDENT] set theSecondSlide to slide 2 of front document[/INDENT] [INDENT] set theChart to chart 1 of theSecondSlide[/INDENT] [INDENT] [/INDENT] [INDENT] -- update the chart data[/INDENT] [INDENT] set the data of theChart to theChartData[/INDENT] [INDENT]end tell[/INDENT] [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
Automating Keynote - update Chart data
Top