3 Replies Latest reply on Feb 17, 2014 12:19 AM by musoguy

    Export Fields to Excel




      I have created a script to export a layout to Excel. As part of this export, I have linked the database to another database and am exporting 3 fields from this linked database.


      This all works fine, however, when I export, the 3 linked fields are prefixed with the filename of the related database.


      So, I have roughly 15 fields, the field names for 12 of them export correctly, however the others are prefixed with (in this case) "Archived Access Dates::"


      Any advice on how I might be able to remove this prefix...?



        • 1. Re: Export Fields to Excel

          The easiest way is to create 3 new calculation fields in the table you're exporting from. Name them what you want and have their calcs be:  =Archived Access Dates::YourField1.

          Export them along with the 12 native fields and avoid the actual related fields altogether..



          • 2. Re: Export Fields to Excel

            Hi Kyle,


            Thanks for this.


            This would typically be the ideal solution. However, I have an issue in that I already have 3 fields in my main database I am exporting from which are labelled the same. So to clarify:


            Main Database I am exporting from - 15 fully populated fields including the following:

            - LAST DATE

            - LAST VOLUME

            - LAST ISSUE


            The script I have setup is based on a particular output which requires a different set of last date/volume/issue nos. Hence, I have created a separate database.


            Relational Database (called "Archived Access Dates"):

            - LAST DATE

            - LAST VOLUME

            - LAST ISSUE


            So, my script outputs the 12 fields from my main database plus the 3 fields in the relational database instead of in the main database (if that makes sense!). The fields have to be labelled in an exact way, unfortunately...


            Hope this clarifies - thanks!

            • 3. Re: Export Fields to Excel

              Have a look at the link below, this may lead you in the right direction. Unfortunately because you (rightly) cannot name two different fields in the same table by the same name, in your case the calc fields mentioned would not work, as you indeed mentioned. So you'll have to get more creative.