11 Replies Latest reply on Mar 30, 2012 3:13 AM by RuneEilertsen

    Automate copy/paste

    RuneEilertsen Level 1

      Hi.

      I'm working on a catalogue where i have each product listed with text and pictures. Under each product, I got a table where the item number, description and price are going to be. All this info is in a excel table. Some products has more than one listing in the same table and some has only one. What i'm hoping to achieve is to automate this process and get indesign to understand what info is going into the correct table. Is this possible or is the old copy/pate my only option?

       

      Rune

        • 1. Re: Automate copy/paste
          Peter Spier Most Valuable Participant (Moderator)

          There are a number of commercial third-party catalog plugins for InDesign that can make this sort of thing very easy, and if you do a lot of this they are well worth the expense. However, depending on how your Excel file is set up, you may be able to do what you want using InDesign's built-in Data Merge function. It's primitive, but it can place text and images. Data Merge cannot manipulate the data, however, (beyond deleting blank lines from your layout), and each record needs to have the same number of fields, though any of them can be empty. I use it for doing an association directory, and I play games like inserting a newline marker character where a field might contain more than one paragraph, then run Find/Change to make those markers into actual breaks. I didn't set up the data file, so I don't have a choice -- multiple fields is a lot easier, and allows for more text as there is a character limit in the text file for any particular cell and it will truncate when you convert your Excel file to text for use with Data Merge.

           

          The Help files are actually pretty good on Data Merge

          • 2. Re: Automate copy/paste
            Colin Flashman Adobe Community Professional

            Am inclined to agree with Peter... until I read the magical words in the opening post:

             

            Some products has more than one listing in the same table and some has only one.

            Indesign's data merge can handle one to one relationship databases – that is, one record = one picture, one SKU, one description, one table, etc...

             

            Indesign's data merge doesn't handle one to many relationship databases, such as one record may have many listings...

             

            However, data merge is an ENORMOUS step up from cutting and pasting and definitely a realistic option. Another way is XML based publishing, but the learning curve is steep... Mount Everest steep.

            • 3. Re: Automate copy/paste
              Peter Spier Most Valuable Participant (Moderator)

              I think it depends on how you interpret more than one listing, and what the result should look like, and whether the more than one equals multiple times the same product is listed, and a lot of other stuff we really don't know (which is kind of why I said "depending on how your Excel file is set up") and makes a huge difference in what will or won't work.

               

              Would you mind adding a link to your blog in this thread, too? (Cole does some pretty amazing stuff with Data Merge, and he blogs about it).

              • 4. Re: Automate copy/paste
                RuneEilertsen Level 1

                Hi.

                Thanks for the reply.

                 

                I have thought about using data merge, but I don't think it would work in my case. I've set up an illustration to show what i'm trying do do. The excel file will look exactly the same as the tables in my catalogue, but it will contain all the products in one table/list. This goes on for over 200 pages, so copy/paste will kill me:)

                Table demo.jpg

                • 5. Re: Automate copy/paste
                  Grant H Level 4

                  ndesign's data merge doesn't handle one to many relationship databases

                   

                  hmnn, never thought/knew about that! (Dont think ive ever had to try actually ....)

                   

                  @ Rune.... wont it be easy enough to create new "columns" in a copy exel doc for each new item info and delete the duplicate listings

                  1 person found this helpful
                  • 6. Re: Automate copy/paste
                    Peter Spier Most Valuable Participant (Moderator)

                    Entirely doable, IF all the data for each product is in a single row. You just need enough columns to accomodate the product with the most entries, and products with fewer you leave cells blank.

                    1 person found this helpful
                    • 7. Re: Automate copy/paste
                      RuneEilertsen Level 1

                      Thanks..

                      I'm not sure if I fully understand what you mean. I'm not the one setting up the excel file, so I have to explain this to my client.

                       

                      I take it this involves using data merge? How will I do the "tagging" in each table cell with the data merge panel. Maybe I'm far out, I havent used the data merge function much.

                      • 8. Re: Automate copy/paste
                        Peter Spier Most Valuable Participant (Moderator)

                        Data merge can do the image and the stuff to the right (your bulleted lists can be handled as either one cell, with a marker that you'll change to creat multiple bulleted paragraphs after the merge, or one cell per bullet item. The table below will need to have one cell in each record for each of the maximum number of cells that will be in any of these tables, so if you have three rows of three, that's nine columns in the Excel Spread sheet, each with a unique name at the top (r1-c1, r1-c2, ... r3-c2, r3-c3 for example). EVERY product needs to have all of the columns, and each column gets a unqiue tag. If a product doesn't use all of the columns, leave them blank and they will be blank in the merge. If there is nothing on a line in the merged document but blank fields (and nothing means no punctuation or whitespace, too), the line will be removed. I don't think this will work without some manual intervention, though, for building an actual table. You'll wind up having to remove the blank rows yourself. This also gets a bit more complicated by the fact that a merged doc is a series of individual frames, so unless you thread them after the merge (Rorohiko has a script to do this) adjusting a frame size won't affect others on the page, and if you do thread them, the best technique I've found is to thread, then delete all but the first frame, adjust it to fill the page, then pick up the overset and autoflow ont the following apges so you have only one frame per page.

                         

                        You really might want to look at something like Easy Catalog before getting too deep into this.

                        1 person found this helpful
                        • 9. Re: Automate copy/paste
                          John Hawkinson Level 5

                          I'm not sure if I fully understand what you mean. I'm not the one setting up the excel file, so I have to explain this to my client.

                          I think you should plan on getting the Excel file from your client and reworking it to fit InDesign's needs.

                          Either that or creating the Excel file to start with and sending it to the client as a template.

                          • 10. Re: Automate copy/paste
                            jmlevy Adobe Community Professional

                            Have a look here. It is a script written by Loic Aigon, a well-known French scripter. Sorry, the page has not been translated in English.

                            1 person found this helpful
                            • 11. Re: Automate copy/paste
                              RuneEilertsen Level 1

                              Hi.

                              Thanks for your reply.

                               

                              This looks like something I could use. I have to translate the text to know for sure, but by looking at the pics, it seem promesing. A big thanks to all that have helped me with this problem. I have to try out the options and hopefully one of the solutions will work for me.

                               

                              Rune