• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Scripts that interact with other applications, such as Excel

Contributor ,
Jan 15, 2015 Jan 15, 2015

Copy link to clipboard

Copied

Hello Everyone,

This is from the Illustrator CS6 Scripting guide.

"A script is a series of commands that tells Illustrator to perform one or more tasks. These tasks can be

simple, affecting only one object in the current document, or complex, affecting objects in all your

Illustrator documents. The tasks might even involve other applications, like word processors, spreadsheets,

and database management programs."

I have been trying to find a starting point to figure out how to do this, but I have not found any examples online. Is their any resources out there that anyone knows of? One of the things I am trying to do for example, is to copy a specific column from an excel document and pasting it into illustrator. Thanks in advance!

TOPICS
Scripting

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 16, 2015 Jan 16, 2015

agree with the comments above, there are different ways to solve a particular need...if you want to explore direct back and forth communication between Excel and Illustrator on Windows, here's a little start up guide

Re: Illustrator VBA scripting 101 - via Excel

Votes

Translate

Translate
Adobe
Valorous Hero ,
Jan 15, 2015 Jan 15, 2015

Copy link to clipboard

Copied

Mmm, well, what are you on, Mac or Windows?  I've actually been messing around with this and I've got stuff working on Macs better than I do PCs, because Applescript is somewhat more intuitive to me.  Most advanced I've gotten previously was re-creating a chart inside Illustrator from Excel by reading the chart properties with Applescript and then launching a dynamically created javascript to draw it in Illustrator.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

Thanks for commenting, I have both a mac and pc, but the pc has office so I will be using that. So you were able to use an AppleScript script in Excel to call a JavaScript script in Illustrator and use the data from the excel script in the JavaScript/Illustrator one? That's awesome I've been trying to figure out if doing something like that was possible. I would like to use Javascript as much as possible because I don't know much about VBA, but if it's possible to use JavaScript for the Illustrator portion of the script, I am sure their are lots of VBA Excel examples I can look at because Excel is probably pretty commonly used by people with programming knowledge. I just need to learn how to go back and forth between applications and programming languages in script. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

Ok, I can tell you my experience, and if anyone sees this and can comment a better way, please do:

I think that you can do the copying of your Excel data in VBA, but the only way I know currently is to have a macro inside the excel workbook, which always lives in there and can copy your data , then execute a jsx file, and somehow pass the data in via clip-board or even a temporary .txt file.  The problem with that is that you have to have your workbook macro-enabled, or have a workbook in your excel application which has the macro which can run, but it's the convoluted principle that you have to have this thing in your Excel at all times you want to use it. (As opposed to just running a durn script and not having to open a file with a script inside of it in Excel). 

The other way I can think of is using AutoHotKey to do pretty much the exact same thing, except instead of messing with Excel-specific VBA stuff, you'd have to mess with AHK script, but not have to worry about macros and workbooks.

I think for copying and pasting column cells, you can probably get away with AHK, but this is such unknown territory for me, and like I said, it looks so much easier on Mac, because your applescript can control all the things from one place.

This is very limited world-view that I would like to learn more about, I call out all the lurkers to come out of ye shadows to shed some light on this.

Actually I believe the great CarlosCanto  has much expertise on using Excel and AI together!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

I build interactive applications all the time between AI & ID on the Adobe side and just about anything else that has a Windows API on the Windows application side. In fact, I've built entire businesses with them. The applications talk and control each other as your objectives dictate and remove most of the manual work. I'm not a "lurker" (no offense taken)...   - I just don't have a lot of time and so I just try to help with "quickees" when I can.    Just glancing at what I think that you are trying to achieve, I'm thinking that a .NET approach might be beneficial -- but it's strictly a Windows approach. I prefer a more integrated, systematized approach and less of a "where's that darn script that I need now" approach. While this approach can be more time consuming, the ROI in a production environment can be extremely low. For more specifics and to keep the focus on your thread, please feel free to PM me if you need any more specific info on this.  -TT

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

agree with the comments above, there are different ways to solve a particular need...if you want to explore direct back and forth communication between Excel and Illustrator on Windows, here's a little start up guide

Re: Illustrator VBA scripting 101 - via Excel

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

Hi S-V and TT, Happy New Year!! hello from cold Los Angeles!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

Thanks Everyone, you are all so very helpful. Thanks Carlos, that looks like a great starting point I'll check out that forum and I will probably be back for more questions haha.  Thanks TT, I need to learn more about programming and I'd love to build interactive applications but this is my first year even knowing what scripting is, in time I would like to learn .NET and all the other useful programming languages. Thanks Silly-V for helping me get started and calling all the "lurkers" to help this thread get going haha.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

Wow I saw myself in Carlos's thread, from back in '12 when I was first getting started!  It's so cute, it's like looking at a baby photo of oneself.  Hahaha!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

LATEST

hahaha right...I read the whole thread, #tbt Fridays

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines