Professional Web Applications Themes

How do I preserve the link to a single cell in an Excel spreadsheet? - Adobe Indesign Windows

I want to import a single cell from an Excel spreadsheet into InDesign 3.0. Initially, I am placing a single cell into a text frame and get the correct text. However, after editing the spreadsheet, the link changes and imports the entire speadsheet (all cells) to the frame rather than 1 cell. Is there a way to preserve the unique cell when updating the link? My ultimate goal is to enter all my prices into the spreadsheet, then update my sales brochure by editing the spreadsheet and updating the link (rather than editing the text directly in hundreds of places ...

  1. #1

    Default How do I preserve the link to a single cell in an Excel spreadsheet?

    I want to import a single cell from an Excel spreadsheet into InDesign 3.0. Initially, I am placing a single cell into a text frame and get the correct text. However, after editing the spreadsheet, the link changes and imports the entire speadsheet (all cells) to the frame rather than 1 cell.

    Is there a way to preserve the unique cell when updating the link? My ultimate goal is to enter all my prices into the spreadsheet, then update my sales brochure by editing the spreadsheet and updating the link (rather than editing the text directly in hundreds of places in the InDesign doent).
    - John
    John_Craighead@adobeforums.com Guest

  2. #2

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    I think you're between a rock and a hard place. You can't set up the kind of linking you're talking about with the built-in linking features. You should be able to use scripting to achieve you aim, but you'd still have to set up some kind of mechanism for relating the target cell back to the orignal Excel cell.

    I suspect that the solution will involve an intermediate file, perhaps two: an InDesign doent into which you place the complete Excel file and then use a script to update the cells you need updating from the intermediate InDesign doent (but even doing that is no picnic because scripts can't label individual cells, so working out the relationships in a manner that can accommodate downstream changes (of cell addresses, not content) is difficult.

    Perhaps an intermediate Excel file might help. One that plucks from the working Excel files only the data you need for your publication. But you'd still be stuck with relating the cells in that file with the cells in your table.

    Good luck.

    Dave
    Dave_Saunders@adobeforums.com Guest

  3. #3

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    I couldn't specify the details without a lot of research (I haven't actually done any InDesign scripts), but the solution I would investigate would be an Excel VBA script to update the InDesign doent. It really should be pretty straightforward.
    Paul_Brodsky@adobeforums.com Guest

  4. #4

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    Paul,

    You're right. Sometimes, I'm so InDesign-centric with my thinking that I can't see the wood for the trees.

    Still, establishing a way to connect a cell in InDesign to a cell in a worksheet will be the issue. If the table in InDesign is fixed and will never change its structure, then it's easy, but if there's a chance that a new row will need adding (say), all the links (whatever form they might be in) will need to be updated.

    Dave
    Dave_Saunders@adobeforums.com Guest

  5. #5

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    Can you link to a single sheet in an Excel file, without linking to other sheets? If so, you could add a sheet (maybe make it the first sheet) with only the one cell that is a direct link to your souce cell. Is that clearer than mud?
    Scott_Falkner@adobeforums.com Guest

  6. #6

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    But then, Scott, your InDesign table would have to be one cell only.

    Aha! Put the single-cell table inside a cell of a larger table -- Eureka!

    Dave
    Dave_Saunders@adobeforums.com Guest

  7. #7

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    I wrote a program in VB 6 that allows maintenance of links between Excel spreadsheets and InDesign 2.0.2 tables. I haven't tested it with InDesign CS. (Because the clueless crew that wrote the InDesign COM server didn't understand or heed Rule 1 of COM programming, they broke a lot of ID 2 scripts when they released ID CS.) The VB program can be downloaded from <http://www.earlvillepost.com/InDesignExcelMaster>.

    If you want to have a go at converting the VB code to VBA, let me know, and I'll provide the source code.
    Stu_Bloom@adobeforums.com Guest

  8. #8

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    Clueless?

    Let's hope none of them see that very harsh put-down.

    Dave
    Dave_Saunders@adobeforums.com Guest

  9. #9

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    Clueless when it comes to COM programming.
    Stu_Bloom@adobeforums.com Guest

  10. #10

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    Stu,

    What is COM programming?

    I've never heard the expression before. But I do know that the changes from 2.0.2 to CS in the scripting arena were all based on valid needs to advance the scripting engine to match the capabilities of CS. It's part of the price of progress.

    Dave
    Dave_Saunders@adobeforums.com Guest

  11. #11

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?



    What is COM programming?




    COM: component object model.

    In technical terms, any object that supports the IUnknown interface is a COM object.

    Any application in the Microsoft world written to be accessible through an object interface is a COM application. Excel, Word, Access, PowerPoint, Outlook, etc., and dozens of third-party apps. InDesign is a COM application - if it wasn't, it would not be programmable via VB.

    Rule 1 of COM is that interfaces are immutable. In English: when you release a new version of a COM server (i.e., objects that are available for manipulation by a client), you maintain backward compatibility so that clients don't get broken.

    Because scripts written against the InDesign 2 object model don't work in InDesign CS (at least some of them don't), InDesign CS doesn't meet the interface immutability standard. That means the programmers who designed it are clueless. If it was one or two minor issues, that would be one thing - but there are wholesale problems. At least 2/3 of the scripts that I wrote for ID 2 don't work at all under IDCS.

    changes from 2.0.2 to CS in the scripting arena were all based on valid
    needs to advance the scripting engine to match the capabilities of CS.
    It's part of the price of progress.




    People who know what they're doing can advance capabilities without breaking existing clients. I have a ton of applications that I wrote to work with Excel 95 as a COM server. They all still work with Excel 2002.

    It's not rocket science. You simply don't change the signature of methods (i.e., their arguments and return types). If you need to add new capabilities in a new version, you provide a new method, alongside the old. That way, clients that call the old method can continue to work with the new version, while new clients can call the new methods. Look through the doentation of the object model for any of the Microsoft apps. You'll see methods that are tagged "for compatibility purposes," with advice that new programs should use the newer methods.

    The problem in InDesign is exacerbated by the problem that the ID object model is such an inconsistent, convoluted mess, clearly designed by people who did not understand COM and who were not even familiar with the standard practices of COM interface design. I suspect that they were Mac-centric programmers who were inadequately trained and supervised.
    Stu_Bloom@adobeforums.com Guest

  12. #12

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    No, they're not clueless. They recognized that following a rule for the sake of following it and thereby locking yourself into a broken implementaton forever was not very sensible.

    Rule 1 is don't be constrained by ridiculous rules that cater to the whims of some bureaucrat when there is greater benefit to be found elsewhere.

    I'd say that the rule-makers are the clueless ones.

    Dave
    Dave_Saunders@adobeforums.com Guest

  13. #13

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    For someone who two hours ago who didn't even know what COM meant, you've apparently become quite an expert in it.

    ridiculous rules that cater to the whims of some bureaucrat




    and that protect the investments of people who in good faith have written clients that rely on the (mistaken) belief that the people writing the server knew what they were doing.
    Stu_Bloom@adobeforums.com Guest

  14. #14

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    No, I'm not an expert, but I can take a stong position in the other direction if I think it's warranted.

    Your use of clueless implies they did this accidentally without any thought to what they were doing. You don't know that. And had they followed your precious rule, you'd probably be complaining about things you wanted to do with CS scripting but couldn't because the object model was stuck at the 2.0.2 level.

    The kind of compatibility you're asking for is possible with slow-changing products later in their life cycles. It might be possible with more dynamic products, but only at the cost of allowing enhancements by adding objects or extending them without changing the core objects. That would make the kinds of advancements we see in CS much more difficult than they were -- the product would either have done less or taken longer (or both).

    Anyway, I've understand what the object model is. I just didn't didn't know what the specific acronym you used was all about.

    Dave
    Dave_Saunders@adobeforums.com Guest

  15. #15

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    It's unfortunate that your "strong position" is based on such a weak foundation.

    had they followed your precious rule, you'd probably be complaining about
    things you wanted to do with CS scripting but couldn't because the object
    model was stuck at the 2.0.2 level.




    Had you understood what I wrote, you would understand that interface immutability does not restrict the adding of features in any way.

    The kind of compatibility you're asking for is possible with slow-changing
    products later in their life cycles.




    That's a sweeping statement, totally unsupported by any facts. The changes in functionality in Word, for example, between Word 95 and Word 2002 are far greater than the changes in InDesign from 2 to CS. (I'm not arguing that the functionality added to Word is terribly useful, only that there's a lot of it, and it's all fully supported by the object model, without breaking any old client code.)

    It might be possible with more dynamic products, but only at the cost
    of allowing enhancements by adding objects or extending them without changing
    the core objects.




    Uh, that's the point. Adding objects or extending existing objects by adding new methods is the right way to do it.

    That would make the kinds of advancements we see in CS much more difficult
    than they were -- the product would either have done less or taken longer
    (or both).




    Do you have some examples of some of "the kinds of advancements we see in CS" that would have been made "much more difficult than they were" by preserving compatibility with the ID 2 object model?

    The simple truth is that Microsoft understands COM programming and puts the resources behind it to do it right. Adobe neither understands it nor is willing to devote the resources - as evidenced by the shoddy implementation and the unbelievably wretched doentation.
    Stu_Bloom@adobeforums.com Guest

  16. #16

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    I think your solution will work but then I end up with 200 spread sheets each containing one cell. (I have about 200 items in my brochure - each with a unique price.) At that point I am better off manually editing the text in the InDesign doent. Do you have any other suggestions ?

    Thanks, John
    John_Craighead@adobeforums.com Guest

  17. #17

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    Stu,

    I'm not going to take this any further because it's all rather pointless.

    You wish things were different than they are and so you label the people who made the changes "clueless."

    I don't think they're clueless. The changes they made were made with considerable attention to the issues at hand. The underlying objects changed so changes were made to the object model.

    I suggest that the place to discuss this further, if you have the interest, is the InDesign scripting forum.

    Dave
    Dave_Saunders@adobeforums.com Guest

  18. #18

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?



    You wish things were different than they are and so you label the people
    who made the changes "clueless."




    Oh, I wish lots of things were different than they are, without labeling the people responsible as "clueless." In this case, however, they are genuinely clueless.

    The underlying objects changed so changes were made to the object model.




    This was a moderate-level upgrade that added a bunch of new features. Little or nothing changed.

    I do note that you have not accepted by invitation to cite "examples of some of 'the kinds of advancements we see in CS' that would have been made 'much more difficult than they were' by preserving compatibility with the ID 2 object model?"
    Stu_Bloom@adobeforums.com Guest

  19. #19

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    [email]Dave_Saundersadobeforums.com[/email] wrote in
    news:3bb3caaa.15webx.la2eafNXanI:
    > Stu,
    >
    > I'm not going to take this any further because it's all rather
    > pointless.
    Haven't you figured out yet that Stu likes to troll this forum,
    spouting provocative hyperbole, in the hopes of getting a rise out of
    someone?
    Guy_Smiley@adobeforums.com Guest

  20. #20

    Default Re: How do I preserve the link to a single cell in an Excel spreadsheet?

    Mr. Henson ... Mr. Henson ... Your children are acting up again.
    Stu_Bloom@adobeforums.com Guest

Similar Threads

  1. EXCEL spreadsheet
    By susan_sicora@adobeforums.com in forum Adobe Indesign Windows
    Replies: 13
    Last Post: November 14th, 02:58 AM
  2. Spreadsheet::PExcel : read cell-notes
    By peter pilsl in forum PERL Modules
    Replies: 1
    Last Post: May 28th, 09:35 PM
  3. preserve the link to a single Excel cell when updating link
    By John_Craighead@adobeforums.com in forum Adobe Indesign Windows
    Replies: 1
    Last Post: April 29th, 03:08 AM
  4. importing a single cell into InDesign from Excel
    By John_Craighead@adobeforums.com in forum Adobe Indesign Windows
    Replies: 0
    Last Post: April 14th, 11:37 PM
  5. ASP and excel spreadsheet
    By Atrax in forum ASP
    Replies: 0
    Last Post: September 19th, 08:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139