FYI, I'm on the east coast and have to get up early tomorrow (today), so please forgive me if I don't respond again until the morning. I really appreciate any suggestions you may have for me.
here you go, this is VBA code, I prefer to use it when I need to have Excel talk to Illustrator directly without exporting the Excel data.
to set up...
- Open Excel
- hit Alt+F11, to bring up the editor
- in the Tools menu, click on References...
- add a reference to "Adobe Illustrator CS5 Type Library" (or CS4 or your version)
- in the Personal.xls (or in any other book) add a Module. Personal is a global workbook that is always available. If you don't see it, go back to Excel and record a macro, anything will do. That will create the Personal file.
- and type the following in that module
Sub makeSquares()
'carlos canto // 6/26/13
'reads the active Excel workbook data to create squares in Illustrator
'data is organized in rows as follows x, y, width, height
'data has no headers, first row in cell "A1"
Dim iapp As New Illustrator.Application
Dim idoc As Illustrator.Document
Dim isquare As Illustrator.PathItem
Dim rowcount As Integer
Dim x As Double
Dim y As Double
Dim w As Double
Dim h As Double
rowcount = Cells(1, 1).CurrentRegion.Rows.Count
Set idoc = iapp.Documents.Add
For i = 1 To rowcount
x = Cells(i, 1)
y = Cells(i, 2)
w = Cells(i, 3)
h = Cells(i, 4)
Set isquare = idoc.PathItems.Rectangle(y, x, w, h)
Next
Set isquare = Nothing
Set idoc = Nothing
Set iapp = Nothing
End Sub
- save Personal book
- to run, move the cursor anywhere inside the Sub...End Sub and hit F5
for simplicity, start illustrator before running the script