Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Excel text boxes not importing

Return to Member Forum

  • Author
    Posts
    • #77466
      AaronA
      Participant

      I have an Excel file with many text boxes that I need to place into ID. The spreadsheet tables/cells come through fine, but the text boxes not at all. Anyone know a way to get these in?

    • #77523
      AaronA
      Participant

      No one knows the answer to this one? Seems like a huge omission if InDesign doesn’t support this.

    • #77524
      David Blatner
      Keymaster

      That is correct; InDesign imports worksheet data, but not text frames, charts, and other stuff like that.

    • #77525
      AaronA
      Participant

      Thanks David. Wow, I’m surprised my Google searching doesn’t reveal anyone else having encountered this problem.

      Well, I’m working on a fix in case it helps anyone. Here’s an Applescript that dumps contents of all text frames of the active Excel doc into page 1 of the active ID file (paste into Script Editor and hit Enter key to see proper formatting — and change the en dashes in comments into 2 hyphens; this site auto-‘cleaned’ them when I pasted):

      set textbox_text to {“”}

      tell application “Microsoft Excel”
      tell active workbook
      repeat with y from 0 to count of sheets
      tell sheet y
      –get properties of text frame 1
      repeat with x from (count of textboxes) to 1 by -1
      set textbox_text to textbox_text & caption of textbox x & return & return
      end repeat
      end tell
      end repeat
      end tell
      end tell

      textbox_text

      tell application “Adobe InDesign CS6”
      –Find change needed to add proper paragraph ends where before were forced line breaks
      set find grep preferences to nothing
      set change grep preferences to nothing
      set find text preferences to nothing
      set change text preferences to nothing
      set find what of find text preferences to “^n” –forced line break from Excel text box
      set change to of change text preferences to “^p” –end of paragraph

      activate
      tell active document
      tell page 1
      make new text frame with properties {geometric bounds:{2, 1.8, 27, 19.8}, contents:textbox_text as string}
      end tell
      end tell

      set myFoundItems to change text

      end tell

    • #77530
      David Blatner
      Keymaster

      Cool. Thanks!
      One question: Can you open that excel document in Word, or save it as an RTF or docx file? Maybe that would let you import it into ID.

    • #77535
      AaronA
      Participant

      Good idea, David. I hadn’t considered that. I tried opening it in Word 2011 and the text boxes didn’t come through — only the tables did. And Excel 2011 doesn’t offer RTF or .docx export, as far as I can see. I tried changing the extension to .docx; Word didn’t like that and judged the file corrupt.

      By the way, in the script above, you can delete the single-line
      ‘textbox_text’.
      It was there just as a debug. And I guess the 2 find/change grep lines could be removed too.

Viewing 5 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads