SpreadJS 13
GC.Spread.Sheets Namespace / Worksheet type / getColumnWidth Method
The column index.
The sheet area. If this parameter is not given, it defaults to viewport.
Whether get the dynamic size. If not given, it defaults to false. If this parameter is true, and dynamic size is not set, will return undefined.
In This Topic
    getColumnWidth Method
    In This Topic
    Gets the width in pixels or the dynamic size for the specified column in the specified sheet area.
    Syntax
    var instance = new GC.Spread.Sheets.Worksheet(name);
    var value; // Type: any
    value = instance.getColumnWidth(col, sheetArea, getDynamicSize);
    function getColumnWidth( 
       col : number,
       (optional) sheetArea : SheetArea,
       (optional) getDynamicSize : boolean
    ) : any;

    Parameters

    col
    The column index.
    sheetArea
    The sheet area. If this parameter is not given, it defaults to viewport.
    getDynamicSize
    Whether get the dynamic size. If not given, it defaults to false. If this parameter is true, and dynamic size is not set, will return undefined.

    Return Value

    The column width in pixels or the dynamic size.
    Example
    This example returns the visible and width settings for a column.
    var visible = activeSheet.getColumnVisible(1, GC.Spread.Sheets.SheetArea.viewport);
    var width = activeSheet.getColumnWidth(1, GC.Spread.Sheets.SheetArea.viewport);
    alert(visible);
    alert(width);
    Remarks
    The default value is 62 pixels.
    See Also

    Reference

    Worksheet type