Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CLIPWKS -Spreadsheet Library - <b>limport()</b> <b>import.prg</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
limport()                                                           IMPORT.PRG
------------------------------------------------------------------------------------------
 Purpose
   To import a spreadsheet into a .DBF file

 Syntax
   Limport( cSpreadsheet,cDBF_file [,cRange] [,cDefType] )


 Parameters
   cSpreadsheet - name of the spreadsheet to read
   cDBF_file    - name of .DBF file to import into
   cRange       - optional range of cells to import
   cDefType     - optional default field type

 Returns
   nStatus      0 = Ok
               -1 = Missing spreadsheet
               -2 = Problem opening the file
               -3 = Invalid range specified
               -4 = Field type unknown in header
               -5 = Problem creating the .DBF file

 Notes
   If the <cDBF_file> exists, it's structure is used and data is appended
   into the file.  If you want a new file created, be sure to ZAP the file
   before Limport().

   If the <cDBF_file> does not exist, then Limport() uses the first row in
   the range of cells to determine the types and sizes of the fields in
   the .DBF file.  Be sure to specify a cell range that does not include
   headers, since this would result in all fields being character type,
   which might not be what you want.  For example:

        +---------------------------------------------------+
        |         A                 B                C      |
        | 1   Name              Hire date        Salary     |
        | 2   Bill Clinton      22-JAN-93        120,000.00 |
        | 3   Al Gore           22-JAN-93         80,000.00 |
        +---------------------------------------------------+
          Specify range A2..C3 rather than A1..C3.

 Category
   High-level functions

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson