TExcelFile.GetColWidth Method
Overloads
TExcelFile.GetColWidth(Integer)
Returns the current Column width, in Excel internal units. (Character width of "font 0" / 256) See Excel Internal Units for more information in Excel internal units.
Use TExcelMetrics.ColMult to convert the internal units to pixels.
Syntax
Unit: FlexCel.Core
function TExcelFile.GetColWidth(const col: Integer): Integer; overload; virtual; abstract;
Parameters
| <-> | 
Parameter | 
Type | 
Description | 
| const | 
col | 
Integer | 
Column Index (1 based) | 
 
Returns
Column width in internal excel units.(Character width of "font 0" / 256)
Examples
  ColWidthInPixels := xls.GetColWidth(Col) / TExcelMetrics.ColMult(xls);
See also
TExcelFile.GetColWidth(Integer, Boolean)
Returns the current Column width, in Excel internal units. (Character width of font 0 / 256) See Excel Internal Units for more information in Excel internal units.
Use TExcelMetrics.ColMult to convert the internal units to pixels.
Syntax
Unit: FlexCel.Core
function TExcelFile.GetColWidth(const col: Integer; const HiddenIsZero: Boolean): Integer; overload; virtual; abstract;
Parameters
| <-> | 
Parameter | 
Type | 
Description | 
| const | 
col | 
Integer | 
Column Index (1 based) | 
| const | 
HiddenIsZero | 
Boolean | 
If true, the width returned for a hidden column will be 0 and not its real width. | 
 
Returns
Column width in internal excel units.(Character width of font 0 / 256)
Examples
  ColWidthInPixels := xls.GetColWidth(Col) / TExcelMetrics.ColMult(xls);
See also
TExcelFile.GetColWidth(Integer, Integer, Boolean)
Returns the current Column width for a given sheet, in Excel internal units. (Character width of font 0 / 256) See Excel Internal Units for more information in Excel internal units.
Use TExcelMetrics.ColMult to convert the internal units to pixels.
Syntax
Unit: FlexCel.Core
function TExcelFile.GetColWidth(const sheet: Integer; const col: Integer; const HiddenIsZero: Boolean): Integer; overload; virtual; abstract;
Parameters
| <-> | 
Parameter | 
Type | 
Description | 
| const | 
sheet | 
Integer | 
Sheet where to look for the width. | 
| const | 
col | 
Integer | 
Column Index (1 based) | 
| const | 
HiddenIsZero | 
Boolean | 
If true, the width returned for a hidden column will be 0 and not its real width. | 
 
Returns
Column width in internal excel units.(Character width of font 0 / 256)
Examples
  ColWidthInPixels := xls.GetColWidth(Col) / TExcelMetrics.ColMult(xls);
See also