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>lreplace()</b> <b>readwks.prg</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
lreplace()                                                         READWKS.PRG
------------------------------------------------------------------------------------------
 Purpose
   To replace an existing cell's contents

 Syntax
   Lreplace( aWks, xData, cCell )

 Parameters
   aWks      - Spreadsheet handle array
   xData     - New data to replace into the cell
   cCell     - Cell address to change

 Returns
   nStatus        -   0   = All ok
                     -6   = Invalid parameters
                     -12  = Spreadsheet open readonly

 Example
function main
    LOCAL aWks := Lread("PRESDENT.WK3",.T.,.T.)
    if !empty(aWks)
       Lreplace(aWks,"Bill Clinton","A2")
       Lreplace(aWks,"Al Gore","A3")
       Lclose(aWks)
    endif
return nil

 Notes
   Lreplace() allows you to change the values in an existing spreadsheet
   file. It also will allow you to add new values into the file. By default,
   when you open a spreadsheet it is opened readonly so you do not
   accidently replace data. See Lread() for the syntax to open spreadsheets
   for update.

 Category
   Reading spreadsheet files

See Also: Lread()

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