4 Replies Latest reply on Nov 15, 2015 2:06 AM by VitusCZ

    Import excel file with more sheets

    VitusCZ

      Hello,

       

      I have excel file which contains 5 sheets and I need import second and third sheets.

      I created script for import, but when I choose import without dialogue it's automatically selected the first sheet.

       

      Vit

        • 1. Re: Import excel file with more sheets
          steveromig

          Hello,

           

          I have excel file which contains 5 sheets and I need import second and third sheets.

          I created script for import, but when I choose import without dialogue it's automatically selected the first sheet.

           

          Vit

           

          I am unable to reproduce this using FileMaker Pro 14.  What version of FileMaker Pro are you using?

           

          Keep in mind that when you specify the (Excel) file you want to import from in the Import Records script step that you should be prompted with a dialog asking what worksheet you want to import from and that becomes part of the script step.  Then duplicate that script step and modify the worksheet that is being imported from.  Something like this (on OS X)...

           

          Import Records [No dialog; Source: "TestFile.xlsx"; Worksheet: "Sheet3"; Add; Mac Roman]

          Import Records [No dialog; Source: "TestFile.xlsx"; Worksheet: "Sheet1"; Add; Mac Roman]

          Import Records [No dialog; Source: "TestFile.xlsx"; Worksheet: "Sheet2"; Add; Mac Roman]

           

          Steve Romig

          FileMaker, Inc.

          • 2. Re: Import excel file with more sheets
            TKnTexas

            Create three subscripts, each to import a different sheet.  Call these from a single master script.

            • 3. Re: Import excel file with more sheets
              VitusCZ

              How can I insert the worksheet name if the file name is $value ?

              • 4. Re: Import excel file with more sheets
                VitusCZ

                My application is in FM 13 advanced and server, so I'm testing FM 14 now.

                How can I insert the worksheet name if the file name is $value ?


                I have next situation:

                $Path is fixed: filemac:/DATA/For_Import/

                I'm loading the contents of a directory $Path to the $Files (names are unfixed - previously unknown)

                Then I detect  specific filename (... 2015_09.xlsx, 2015_10.xlsx...) and I input it to the $Name and I create $value = $Path & $Name.

                From this file I need import second and third sheets and it's my problem.