Save Table|Selection as Image File

Sharing table data with others is a common practice. And while you can copy and paste formatted table data between some applications (such as from Numbers to Mail, TextEdit, Keynote, etc.), it is often preferable to share the table data as an un-editable image file. This script will convert either the entire table, or just the selected range of cells, into an image file in PNG format.

The script provides examples of these techniques:

  • Interacting with the script user (7, 39, 48)
  • Using the Accessibility Frameworks to mimic user keystrokes (18, 33)
  • Retrieving image data from the clipboard (44)
  • Saving image data to file (75-92)
  • Displaying table data in other applications (54, 59)

Here’s the script: