Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

XL Import and Export

All examples are included with download of MBS FileMaker Plugin.

XL Import and Export.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 7
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields On
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Table
10 fields defined, 2 records
Table

Fields

Table Name: Table - 10 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
PrimaryKey Normal, Text Auto-Enter:
  • Context table: Table
    Calculation: Get( UUID )
Validation:
  • Only during data entry
  • Not empty
  • Unique
  • Strict validation
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: Unicode Raw
Unique identifier of each record in this table
          CreationTimestamp Normal, Timestamp Auto-Enter:
          • Creation timestamp
          Validation:
          • Only during data entry
          • Strict data type: 4 digit year
          • Not empty
          • Strict validation
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
          Date and time each record was created
                  CreatedBy Normal, Text Auto-Enter:
                  • Creation account name
                  Validation:
                  • Only during data entry
                  • Not empty
                  • Strict validation
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                  Account name of the user who created each record
                          ModificationTimestamp Normal, Timestamp Auto-Enter:
                          • Modification timestamp
                          Validation:
                          • Only during data entry
                          • Strict data type: 4 digit year
                          • Not empty
                          • Strict validation
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                          Date and time each record was last modified
                                  ModifiedBy Normal, Text Auto-Enter:
                                  • Modification account name
                                  Validation:
                                  • Only during data entry
                                  • Not empty
                                  • Strict validation
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                  Account name of the user who last modified each record
                                          First Name Normal, Text Auto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              Last Name Normal, Text Auto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  Birthday Normal, Date Auto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: None
                                                  • Automatically create indexes as needed
                                                  • Index Language: German
                                                      Amount Normal, Number Auto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German
                                                          Excel File Normal, Binary Auto-Enter:
                                                          • Allow editing
                                                          Validation:
                                                          • Only during data entry
                                                          Storage:
                                                          • Global
                                                          • Repetitions: 1

                                                              Layout Objects: Table

                                                              Regular Fields

                                                              Field Name: Table::First Name
                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                              • Top: 151 pt
                                                              • Left: 138 pt
                                                              • Bottom: 182 pt
                                                              • Right: 391 pt
                                                              • Anchoring: Left, Top
                                                              Field Format:
                                                              • Edit Box
                                                              Field Behavior:
                                                              • Allow field to be entered: In Find mode, In Browse mode
                                                              • Touch keyboard type: Default for Data Type
                                                              • Go to next field using: Tab key
                                                              Yes

                                                              Field Name: Table::Last Name
                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                              • Top: 186 pt
                                                              • Left: 138 pt
                                                              • Bottom: 217 pt
                                                              • Right: 391 pt
                                                              • Anchoring: Left, Top
                                                              Field Format:
                                                              • Edit Box
                                                              Field Behavior:
                                                              • Allow field to be entered: In Find mode, In Browse mode
                                                              • Touch keyboard type: Default for Data Type
                                                              • Go to next field using: Tab key
                                                              Yes

                                                              Field Name: Table::Birthday
                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                              • Top: 151 pt
                                                              • Left: 515 pt
                                                              • Bottom: 182 pt
                                                              • Right: 756 pt
                                                              • Anchoring: Left, Top
                                                              Field Format:
                                                              • Edit Box
                                                              Field Behavior:
                                                              • Allow field to be entered: In Find mode, In Browse mode
                                                              • Touch keyboard type: Default for Data Type
                                                              • Go to next field using: Tab key
                                                              Yes

                                                              Field Name: Table::Amount
                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                              • Top: 186 pt
                                                              • Left: 515 pt
                                                              • Bottom: 217 pt
                                                              • Right: 756 pt
                                                              • Anchoring: Left, Top
                                                              Field Format:
                                                              • Edit Box
                                                              Field Behavior:
                                                              • Allow field to be entered: In Find mode, In Browse mode
                                                              • Touch keyboard type: Default for Data Type
                                                              • Go to next field using: Tab key
                                                              Yes

                                                              Field Name: Table::Excel File
                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                              • Top: 11 pt
                                                              • Left: 756 pt
                                                              • Bottom: 136 pt
                                                              • Right: 1009 pt
                                                              • Anchoring: Left, Top
                                                              Field Format:
                                                              • Edit Box
                                                              Field Behavior:
                                                              • Allow field to be entered: In Find mode, In Browse mode
                                                              • Touch keyboard type: Default for Data Type
                                                              • Go to next field using: Tab key
                                                              No

                                                              Buttons

                                                              Button Properties Coordinates Script/Script Step
                                                                Type:
                                                              • Text: Export to Excel into Container
                                                                Additional Properties:
                                                              • Change to hand cursor over button
                                                              • Top: 24 pt
                                                              • Left: 290 pt
                                                              • Bottom: 55 pt
                                                              • Right: 531 pt
                                                              • Anchoring: Left, Top
                                                              Perform Script [ “Export to Container” ]

                                                              Scripts:


                                                              Button Properties Coordinates Script/Script Step
                                                                Type:
                                                              • Text: Import Excel from Container
                                                                Additional Properties:
                                                              • Change to hand cursor over button
                                                              • Top: 67 pt
                                                              • Left: 290 pt
                                                              • Bottom: 98 pt
                                                              • Right: 531 pt
                                                              • Anchoring: Left, Top
                                                              Perform Script [ “Import from Container” ]

                                                              Scripts:


                                                              Button Properties Coordinates Script/Script Step
                                                                Type:
                                                              • Text: Import Excel from File
                                                                Additional Properties:
                                                              • Change to hand cursor over button
                                                              • Top: 109 pt
                                                              • Left: 290 pt
                                                              • Bottom: 140 pt
                                                              • Right: 531 pt
                                                              • Anchoring: Left, Top
                                                              Perform Script [ “Import from File” ]

                                                              Scripts:


                                                              Script Hierarchy

                                                              InitXL
                                                              Export to Container
                                                              Export to File
                                                              Build Excel file
                                                              Import from Container
                                                              Import from File
                                                              Import Excel file

                                                              Next Script: [Export to Container]
                                                              Script Name InitXL
                                                              Run script with full access privileges Off
                                                              Siri Shortcut Visible Off
                                                              Include In Menu Yes
                                                              Layouts that use this script
                                                                Scripts that use this script
                                                                Script Definition
                                                                Script Steps
                                                                • #Find libXL and load it
                                                                • #you can have libraries in container and export at runtime to folder of your choice.
                                                                • #Or install library somewhere and pass path.
                                                                • #If library is in same folder as plugin, you can only pass only file name.
                                                                • If [ MBS("IsServer") ]
                                                                • #Put the path you use for your server here:
                                                                • If [ Get(SystemPlatform) = -2 ]
                                                                • #Server on Windows
                                                                • Set Variable [ $path; Value:"C:\Programs\FileMaker Server\libxl.dll" ]
                                                                • Else If [ MBS("IsLinux") ]
                                                                • #Server on Linux for FileMaker Cloud
                                                                • Set Variable [ $path; Value:"/opt/FileMaker/FileMaker Server/libxl.so" ]
                                                                • Else [ ]
                                                                • #Server on Mac
                                                                • Set Variable [ $path; Value: "/Library/FileMaker Server/libxl.dylib" ]
                                                                • End If
                                                                • Else [ ]
                                                                • #For desktop and our examples we look in same folder as database:
                                                                • Set Variable [ $databasePath; Value:Get(FilePath) ]
                                                                • Set Variable [ $databasePath; Value:MBS("Path.FilemakerPathToNativePath"; $databasePath) ]
                                                                • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; ".fp7" ; ".fmp12") ]
                                                                • Set Variable [ $databaseName; Value:Get(FileName) & ".fmp12" ]
                                                                • If [ Get(SystemPlatform) = -2 ]
                                                                • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "libxl.dll" ) ]
                                                                • #plugin will look for libxl.dll and if not found also for libxl64.dll (64-bit) and libxl32.dll (32-bit).
                                                                • Else [ ]
                                                                • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "libxl.dylib" ) ]
                                                                • #Mac dylib is usually 32 and 64 bit together.
                                                                • End If
                                                                • End If
                                                                • #You can test for free.
                                                                • #If you like to get a LibXL license, please follow links on our pricing page:
                                                                • #https://www.monkeybreadsoftware.de/filemaker/pricing.shtml
                                                                • Set Variable [ $LicenseeName; Value:"your name" ]
                                                                • Set Variable [ $LicenseKey; Value:"your LibXL license key" ]
                                                                • Set Variable [ $r; Value:MBS( "XL.Initialize"; $path; $LicenseeName; $LicenseKey) ]
                                                                • If [ $r ≠ "OK" ]
                                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Cancel”, Commit: “No” ]
                                                                • Halt Script
                                                                • End If
                                                                Fields used in this script
                                                                  Scripts used in this script
                                                                    Layouts used in this script
                                                                      Tables used in this script
                                                                        Table occurrences used by this script
                                                                          Custom Functions used by this script
                                                                            Custom menu set used by this script

                                                                              Previous Script: [InitXL] Next Script: [Export to File]
                                                                              Script Name Export to Container
                                                                              Run script with full access privileges Off
                                                                              Siri Shortcut Visible Off
                                                                              Include In Menu Yes
                                                                              Layouts that use this script
                                                                              Scripts that use this script
                                                                                Script Definition
                                                                                Script Steps
                                                                                • If [ MBS("XL.IsInitialized") ≠ 1 ]
                                                                                • Perform Script [ “InitXL” ]
                                                                                • End If
                                                                                • Set Variable [ $XML; Value:1 // 1 for XLSX. Pass 0 for older XLS ]
                                                                                • #We create a XLSX and write it to a field
                                                                                • Set Variable [ $book; Value:MBS( "XL.NewBook"; $XML ) ]
                                                                                • Perform Script [ “Build Excel file”; Parameter: $book ]
                                                                                • Set Field [ Table::Excel File; MBS("XL.Book.Save"; $book; If($XML; "test.xlsx"; "test.xls")) ]
                                                                                • Set Variable [ $r; Value:MBS("XL.Book.Release"; $book) ]
                                                                                Fields used in this script
                                                                                Scripts used in this script
                                                                                Layouts used in this script
                                                                                  Tables used in this script
                                                                                  Table occurrences used by this script
                                                                                  Custom Functions used by this script
                                                                                    Custom menu set used by this script

                                                                                      Previous Script: [Export to Container] Next Script: [Build Excel file]
                                                                                      Script Name Export to File
                                                                                      Run script with full access privileges Off
                                                                                      Siri Shortcut Visible Off
                                                                                      Include In Menu Yes
                                                                                      Layouts that use this script
                                                                                        Scripts that use this script
                                                                                          Script Definition
                                                                                          Script Steps
                                                                                          Fields used in this script
                                                                                            Scripts used in this script
                                                                                            Layouts used in this script
                                                                                              Tables used in this script
                                                                                                Table occurrences used by this script
                                                                                                  Custom Functions used by this script
                                                                                                    Custom menu set used by this script

                                                                                                      Previous Script: [Export to File] Next Script: [Import from Container]
                                                                                                      Script Name Build Excel file
                                                                                                      Run script with full access privileges Off
                                                                                                      Siri Shortcut Visible Off
                                                                                                      Include In Menu No
                                                                                                      Layouts that use this script
                                                                                                        Scripts that use this script
                                                                                                        Script Definition
                                                                                                        Script Steps
                                                                                                        • Set Variable [ $book; Value:Get(ScriptParameter) ]
                                                                                                        • If [ Length ( $book ) = 0 ]
                                                                                                        • Exit Script [ ]
                                                                                                        • End If
                                                                                                        • #create sheet
                                                                                                        • Set Variable [ $sheet; Value:MBS( "XL.Book.AddSheet"; $book; "Sales Receipt") ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.SetDisplayGridlines"; $book; $sheet; 0 ) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.SetCol"; $book; $sheet; "A"; "D"; 20 ) ]
                                                                                                        • #create a bold font
                                                                                                        • Set Variable [ $boldFont; Value:MBS( "XL.Book.AddFont"; $book) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Font.SetBold"; $book; $boldFont; 1) ]
                                                                                                        • Set Variable [ $boldFormat; Value:MBS( "XL.Book.AddFormat"; $book) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Format.SetFont"; $book; $boldFormat; $boldFont) ]
                                                                                                        • Set Variable [ $row; Value:0 ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 0; "First Name"; $boldFormat) ]
                                                                                                        • If [ 1 or MBS("IsError") // demo? ]
                                                                                                        • Set Variable [ $row; Value:1 ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 0; "First Name"; $boldFormat) ]
                                                                                                        • End If
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 1; "Last Name"; $boldFormat) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 2; "Birthday"; $boldFormat) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 3; "Amount"; $boldFormat) ]
                                                                                                        • Set Variable [ $dateFormat; Value:MBS( "XL.Book.AddFormat"; $book) ]
                                                                                                        • Set Variable [ $dateFormatID; Value:MBS( "XL.Book.AddCustomNumFormat"; $book; "mmmm\ d\,\ yyyy") ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Format.SetNumFormat"; $book; $dateFormat; $dateFormatID) ]
                                                                                                        • Set Variable [ $dollarFormat; Value:MBS( "XL.Book.AddFormat"; $book) ]
                                                                                                        • Set Variable [ $dollarFormatID; Value:MBS( "XL.Book.AddCustomNumFormat"; $book; "_($* # ##0.00_);_($* (# ##0.00);_($* -??_);_(@_)") ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Format.SetNumFormat"; $book; $dollarFormat; $dollarFormatID) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Format.SetAlignH"; $book; $dollarFormat; 3) // right ]
                                                                                                        • Go to Layout [ “Table” ]
                                                                                                        • Go to Record/Request/Page [ No dialog; First ]
                                                                                                        • Loop [ Flush: Always ]
                                                                                                        • Set Variable [ $row; Value:$row + 1 ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 0; Table::First Name) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 1; Table::Last Name) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteDate"; $book; $sheet; $row; 2; Table::Birthday; $dateFormat) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Sheet.CellWriteNumber"; $book; $sheet; $row; 3; Table::Amount; $dollarFormat) ]
                                                                                                        • Go to Record/Request/Page [ No dialog; Next; Exit after last ]
                                                                                                        • End Loop
                                                                                                        Fields used in this script
                                                                                                        Scripts used in this script
                                                                                                          Layouts used in this script
                                                                                                          Tables used in this script
                                                                                                          Table occurrences used by this script
                                                                                                          Custom Functions used by this script
                                                                                                            Custom menu set used by this script

                                                                                                              Previous Script: [Build Excel file] Next Script: [Import from File]
                                                                                                              Script Name Import from Container
                                                                                                              Run script with full access privileges Off
                                                                                                              Siri Shortcut Visible Off
                                                                                                              Include In Menu Yes
                                                                                                              Layouts that use this script
                                                                                                              Scripts that use this script
                                                                                                                Script Definition
                                                                                                                Script Steps
                                                                                                                • If [ MBS("XL.IsInitialized") ≠ 1 ]
                                                                                                                • Perform Script [ “InitXL” ]
                                                                                                                • End If
                                                                                                                • Set Variable [ $bookRef; Value:MBS( "XL.LoadBook"; Table::Excel File) ]
                                                                                                                • If [ MBS("IsError") ]
                                                                                                                • Show Custom Dialog [ Title: "Error"; Message: $bookRef; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                • Exit Script [ ]
                                                                                                                • Else [ ]
                                                                                                                • Perform Script [ “Import Excel file”; Parameter: $bookRef ]
                                                                                                                • Set Variable [ $r; Value:MBS( "XL.Book.Release"; $bookRef) ]
                                                                                                                • End If
                                                                                                                Fields used in this script
                                                                                                                Scripts used in this script
                                                                                                                Layouts used in this script
                                                                                                                  Tables used in this script
                                                                                                                  Table occurrences used by this script
                                                                                                                  Custom Functions used by this script
                                                                                                                    Custom menu set used by this script

                                                                                                                      Previous Script: [Import from Container] Next Script: [Import Excel file]
                                                                                                                      Script Name Import from File
                                                                                                                      Run script with full access privileges Off
                                                                                                                      Siri Shortcut Visible Off
                                                                                                                      Include In Menu Yes
                                                                                                                      Layouts that use this script
                                                                                                                      Scripts that use this script
                                                                                                                        Script Definition
                                                                                                                        Script Steps
                                                                                                                        • If [ MBS("XL.IsInitialized") ≠ 1 ]
                                                                                                                        • Perform Script [ “InitXL” ]
                                                                                                                        • End If
                                                                                                                        • Set Variable [ $r; Value:MBS("FileDialog.Reset") ]
                                                                                                                        • Set Variable [ $r; Value:MBS("FileDialog.SetShowHidden"; 0) ]
                                                                                                                        • Set Variable [ $r; Value:MBS("FileDialog.SetAllowMulti"; 0) ]
                                                                                                                        • Set Variable [ $r; Value:MBS("FileDialog.SetWindowTitle"; "Import Excel") ]
                                                                                                                        • Set Variable [ $r; Value:MBS("FileDialog.SetPrompt"; "Import") ]
                                                                                                                        • Set Variable [ $r; Value:MBS("FileDialog.SetFilter"; "org.openxmlformats.spreadsheetml.sheet¶com.microsoft.excel.xls"; "*.XLS;*.XLSX"; "Excel files") ]
                                                                                                                        • Set Variable [ $r; Value:MBS("FileDialog.OpenFileDialog") ]
                                                                                                                        • If [ $r = "OK" ]
                                                                                                                        • Set Variable [ $path; Value:MBS("FileDialog.GetPath"; 0) ]
                                                                                                                        • Set Variable [ $bookRef; Value:MBS( "XL.LoadBook"; $path) ]
                                                                                                                        • If [ MBS("IsError") ]
                                                                                                                        • Show Custom Dialog [ Title: "Error"; Message: $bookRef; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                        • Exit Script [ ]
                                                                                                                        • Else [ ]
                                                                                                                        • Perform Script [ “Import Excel file”; Parameter: $bookRef ]
                                                                                                                        • Set Variable [ $r; Value:MBS( "XL.Book.Release"; $bookRef) ]
                                                                                                                        • End If
                                                                                                                        • End If
                                                                                                                        Fields used in this script
                                                                                                                          Scripts used in this script
                                                                                                                          Layouts used in this script
                                                                                                                            Tables used in this script
                                                                                                                              Table occurrences used by this script
                                                                                                                                Custom Functions used by this script
                                                                                                                                  Custom menu set used by this script

                                                                                                                                    Previous Script: [Import from File]
                                                                                                                                    Script Name Import Excel file
                                                                                                                                    Run script with full access privileges Off
                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                    Include In Menu No
                                                                                                                                    Layouts that use this script
                                                                                                                                      Scripts that use this script
                                                                                                                                      Script Definition
                                                                                                                                      Script Steps
                                                                                                                                      • Set Variable [ $book; Value:Get(ScriptParameter) ]
                                                                                                                                      • If [ Length ( $book ) = 0 ]
                                                                                                                                      • Exit Script [ ]
                                                                                                                                      • End If
                                                                                                                                      • #always first sheet and starting at row 0
                                                                                                                                      • Set Variable [ $sheet; Value:0 ]
                                                                                                                                      • Set Variable [ $row; Value:0 ]
                                                                                                                                      • #we use variables to name our columns
                                                                                                                                      • Set Variable [ $FirstNameColumn; Value:0 ]
                                                                                                                                      • Set Variable [ $LastNameColumn; Value:1 ]
                                                                                                                                      • Set Variable [ $BirthdayColumn; Value:2 ]
                                                                                                                                      • Set Variable [ $AmountColumn; Value:3 ]
                                                                                                                                      • Set Variable [ $LastRow; Value:MBS( "XL.Sheet.GetLastFilledRow"; $book; $sheet ) ]
                                                                                                                                      • Set Variable [ $v; Value:MBS( "XL.Sheet.CellReadText"; $book; $sheet; $row; $firstNameColumn ) ]
                                                                                                                                      • If [ $v = "First Name" ]
                                                                                                                                      • #found it
                                                                                                                                      • Else [ ]
                                                                                                                                      • #in demo mode you can't read/write first row
                                                                                                                                      • Set Variable [ $row; Value:$row + 1 ]
                                                                                                                                      • Set Variable [ $v; Value:MBS( "XL.Sheet.CellReadText"; $book; $sheet; $row; $firstNameColumn ) ]
                                                                                                                                      • If [ $v = "First Name" ]
                                                                                                                                      • #found it
                                                                                                                                      • Else [ ]
                                                                                                                                      • Show Custom Dialog [ Title: "No First Name column?"; Message: "We need a proper Excel document with First Name in first column."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                      • Exit Script [ ]
                                                                                                                                      • End If
                                                                                                                                      • End If
                                                                                                                                      • Set Variable [ $row; Value:$row + 1 ]
                                                                                                                                      • Loop [ Flush: Always ]
                                                                                                                                      • #read a row
                                                                                                                                      • Set Variable [ $FirstName; Value:MBS( "XL.Sheet.CellReadText"; $book; $sheet; $row; $FirstNameColumn ) ]
                                                                                                                                      • Set Variable [ $LastName; Value:MBS( "XL.Sheet.CellReadText"; $book; $sheet; $row; $LastNameColumn ) ]
                                                                                                                                      • Set Variable [ $Birthday; Value:MBS( "XL.Sheet.CellReadDate"; $book; $sheet; $row; $BirthdayColumn ) ]
                                                                                                                                      • Set Variable [ $Amount; Value:MBS( "XL.Sheet.CellReadNumber"; $book; $sheet; $row; $AmountColumn ) ]
                                                                                                                                      • If [ MBS("IsError") = 0 and Length ( $FirstName ) > 0 and Length ( $LastName ) > 0 // skip empty rows ]
                                                                                                                                      • #We store to new record
                                                                                                                                      • New Record/Request
                                                                                                                                      • Set Field [ Table::First Name; $FirstName ]
                                                                                                                                      • Set Field [ Table::Last Name; $LastName ]
                                                                                                                                      • Set Field [ Table::Birthday; $Birthday ]
                                                                                                                                      • Set Field [ Table::Amount; $Amount ]
                                                                                                                                      • Commit Records/Requests
                                                                                                                                      • End If
                                                                                                                                      • #next
                                                                                                                                      • Set Variable [ $row; Value:$row + 1 ]
                                                                                                                                      • Exit Loop If [ $row > $LastRow ]
                                                                                                                                      • End Loop
                                                                                                                                      Fields used in this script
                                                                                                                                      Scripts used in this script
                                                                                                                                        Layouts used in this script
                                                                                                                                          Tables used in this script
                                                                                                                                          Table occurrences used by this script
                                                                                                                                          Custom Functions used by this script
                                                                                                                                            Custom menu set used by this script

                                                                                                                                              Download example: XL Import and Export

                                                                                                                                              Used functions: