Re: Bulk replacement of text from spreadsheet or text file
Wim Lewis <[email protected]>
| Newsgroups | gmane.comp.graphics.omnigraffle.user |
|---|---|
| Message-ID | <[email protected]> |
On Jan 5, 2009, at 8:30 PM, Mark Barclay wrote: > Does anyone know of a somewhat automated way to create a bunch of > text objects in OmniGraffle with text from cells in an Excel > spreadsheet (or from a text file, if that is easier)? By automated, > I only mean I don’t want to re-type each item in manually not copy > and paste each one separately. e.g. I might like to have 64 > contiguous cells in a spreadsheet have their text used to replace > the text in 64 selected items in an OmniGraffle drawing. OmniOutliner can import from a number of spreadsheet formats, and OmniGraffle can import OmniOutliner documents --- so that would be one way to import a bunch of spreadsheet rows into an OmniGraffle document. Alternatively, if the text file's format is simple enough to parse with AppleScript, you could write a script which reads items and creates graphics in whatever style you want. The most complex, but most powerful, approach is probably to parse the data file using Python or Perl and use Appscript (an applescript-compatible AppleEvents module) to send the information to OmniGraffle. Another fairly effective way to get outside data into OmniGraffle is to convert it into graphviz DOT format, which is a pretty simple text format, and import it into OmniGraffle. (OG doesn't support the entirely of the DOT language, just the basic stuff.)