3 Replies Latest reply on Jun 17, 2010 4:27 AM by [Jongware]

    Use excel file to highlight parts in a catalogue

    Beefcake3

      Hello

       

      Is it possible to use an excel file to highlight parts in a catalogue? We have an excel file created by a client that contains around 5000 products. This list contains amongst other things, part numbers and TUV and EC approvals ( the table below shows the relevant information in red). We currently go through the catalogue and add TUV or EC icons to relevant parts using the part number to find the product. This takes 3 people around 1 week to do.

       

       

      Part NumPart DescPart TypePrj StatusRegionColor CodeEffort StatusCompliance Status
      41559-07A N OTHER PART AApproved Vehicle OptionCompleteAll - GlobalOrange: Vehicle Option (EC Approved)CompleteFits / Compliant
      41567-07A N OTHER PART BApproved AccessoryCompleteEuropean UnionGreen: Manufactures Certificate (TÜV Approved)CompleteFits / Compliant

       

       

      Is there a way to script InDesign to use the excel file as a source and highlight part numbers in the InDesign files in a specific colour (a different spot colour for TUV and EC approval)? If this is possible, we could then find the relevant colour and insert the icon saving us a lot of time.

       

      I should also mention that my scripting ability is not great.

       

      Thanks for your help

       

      Gary

        • 1. Re: Use excel file to highlight parts in a catalogue
          [Jongware] Most Valuable Participant

          Is that Part Number relevant? If you only need to add an icon to "EC Approved", you can use this method (no scripting involved!):

           

          1. Insert your EC icon anywhere into the document, inline in some text (as this is probably how you add it now as well).

          2. Cut.

          3. With GREP Search/Replace: Search for "\(EC Approved\)" (without the double quotes, but mind to include backslashes before the parens)

          4. .. with this Replacement Text: $0 ~c

            This will "insert" the found text again, essentially not doing anything to it, but it's now followed by a space and the contents of the clipboard.

           

          Do the same for your TUV Approved icon.

           

          This takes 3 people around 1 week to do.

           

          Oh boy ...

          • 2. Re: Use excel file to highlight parts in a catalogue
            Beefcake3 Level 1

            The part number is relevant. The text "EC approved" or "TUV approved" is not in the InDesign Catalogue files, they only appear in the excel list. The icons are used in the InDesign Catalogue files to denote EC or TUV approval.

             

            Thanks

             

            Gary

            • 3. Re: Use excel file to highlight parts in a catalogue
              Kasyan Servetsky Level 5

              You can export your Excel sheet to a CVS file which can be processed by JS like so:

              var cvsFile = File.openDialog("Open Comma-delimited File", "*.cvs");
              if (cvsFile != null) {
                   cvsFile.open("r") ; 
                   var cvsString = cvsFile.read(); 
                   cvsFile.close(); 
                   cvsString = cvsString.split("\n");
                   for(var s = 0; s < cvsString.length; s++) {
                        var lineData = cvsString[s].split(",");
                        //Process each line of data.
                        $.writeln(lineData[0]);
                   }
              }
              

               

              Kasyan