2 Replies Latest reply on Jan 20, 2012 9:18 AM by philmodjunk

    Import 1st field of 1st record of an .XLS file

    Mitch

      Title

      Import 1st field of 1st record of an .XLS file

      Post

      Hi,

      I am sure this is possible, but am not sure where to start.  I have an .XLS spreadsheet and I wish to import the first field value (Field_1) from the first record (Record_1) in the .XLS spreadsheet into a field on my main layout, then import all the remaining fields values (Field_2, Field_3, Field_4...etc) from all the records (Records_1, Record 2, Record_3, Record_4...etc) from the spreadheet into a portal layout attached to my main layout.

      The .XLS's first row is the tiitle of each colomn.

      Any ideas for the script?

      Mitch

       

       

       

       

       

        • 1. Re: Import 1st field of 1st record of an .XLS file
          Sorbsbuster

          Move the first record on to a separate worksheet.

          Go to the Main Layout, select File -> Import records, locate the spreadsheet, and import just the single record.

          Swith to a layout based on the portal's table, select File -> Import records, locate the spreadsheet, and import list of records.

          (There are other ways, but that's the most straightforward).

          Don't forget that you will doubtless want the portal table's records to all include the Key Field that you use to link them back to records in the main table.

          You can script that, of course, if you're going to do it repeatedly.

           

          • 2. Re: Import 1st field of 1st record of an .XLS file
            philmodjunk

            You can also specify a range for the first record and a different range for the rest of the spreadsheet, then do your two imports by specifying different ranges for each.

            However, given that this is just one field of just one record, you might also just import it all in one go and then go to the first record of the found set produced by the import and copy that first field's data to the place it needs to go before deleting this single first record.