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>lwidth()</b> <b>writewks.prg</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
lwidth()                                                          WRITEWKS.PRG
------------------------------------------------------------------------------------------
 Purpose
   Set the column to the specified width or to set the global width in
   the spreadsheet.

 Syntax
   Lwidth( aSpreadsheet [,cColumn|nColumn], nWidth )

 Parameters
   aSpreadsheet - Spreadsheet handle array
   cColumn      - Column letter
   nColumn      - Numeric letter
   nWidth       - Width to set

 Returns
   nStatus      - 0 = All ok
                 -6 = Invalid parameters

 Notes
   Lwidth() is used to set a column width.  You may specify the column
   using letter notation or by referring to the column number.  Widths
   should be set prior to any data being written to the spreadsheet.

 Example

#include "DBSTRUCT.CH"
function main
    LOCAL aWks   := Lcreate("SAMPLE","L3")
    LOCAL aStruc := PAYROLL->( dbstruct() )
    LOCAL i
    LOCAL nSize  := len(aStruc)

    if !empty(aWks)
       for i := 1 to nSize
          Lwidth(aWKs,i,aStruct[i,DBS_LEN])
       next
       Lclose(aWks)
    endif
return .t.

 Category
   Creating spreadsheet files

See Also: Lput()

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