Search Results for

    Show / Hide Table of Contents

    TExcelFile.SetCellValue Method

    Overloads

    • TExcelFile.SetCellValue(string, TCellValue)
    • TExcelFile.SetCellValue(Integer, Integer, TCellValue, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, string, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, TRichString, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Double, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, TDateTime, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Integer, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Int64, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Single, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Integer, TCellValue, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Integer, string, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Integer, Double, Integer)
    • TExcelFile.SetCellValue(Integer, Integer, Integer, Integer, Integer)

    TExcelFile.SetCellValue(string, TCellValue)

    Sets a cell value given a cell reference. While this is normally not needed because you can use TCellAddress to convert the cell reference to row and column and then use a standard SetCellValue call, it can be handy if you know the cell reference (like AX42) and want a fast way to set the value of the cell.

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const cellRef: string; const value: TCellValue); overload;

    Parameters

    <-> Parameter Type Description
    const cellRef string Cell reference in A1 notation. Something like A3, or Sheet1!$B$5 can be used here.
    const value TCellValue Value to set.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, TCellValue, Integer)

    Sets the value and format on a cell.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer) To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: TCellValue; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value TCellValue Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, string, Integer)

    Sets the value on a cell to a string.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: string; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value string Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, TRichString, Integer)

    Sets the value on a cell to a string.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: TRichString; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value TRichString Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Double, Integer)

    Sets the value on a cell to a number.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: Double; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value Double Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, TDateTime, Integer)

    Sets the value on a cell to a datetime.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: TDateTime; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value TDateTime Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Integer, Integer)

    Sets the value on a cell to a number.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: Integer; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value Integer Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Int64, Integer)

    Sets the value on a cell to a number.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: Int64; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value Int64 Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Single, Integer)

    Sets the value on a cell to a number.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const row: Integer; const col: Integer; const value: Single; const XF: Integer = -1); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value Single Value to set.
    const XF Integer Optional: Default value is -1

    Format to Set. You normally get this number with AddFormat function. Use -1 (the default) to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Integer, TCellValue, Integer)

    Sets the value on a cell.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const sheet: Integer; const row: Integer; const col: Integer; const value: TCellValue; const XF: Integer); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const sheet Integer Sheet number, 1 based
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value TCellValue Value to set.
    const XF Integer Format to Set. You normally get this number with AddFormat function. Use -1 to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Integer, string, Integer)

    Sets the value on a cell.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const sheet: Integer; const row: Integer; const col: Integer; const value: string; const XF: Integer); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const sheet Integer Sheet number, 1 based
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value string Value to set.
    const XF Integer Format to Set. You normally get this number with AddFormat function. Use -1 to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Integer, Double, Integer)

    Sets the value on a cell.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const sheet: Integer; const row: Integer; const col: Integer; const value: Double; const XF: Integer); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const sheet Integer Sheet number, 1 based
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value Double Value to set.
    const XF Integer Format to Set. You normally get this number with AddFormat function. Use -1 to keep format unchanged.

    See also

    • TExcelFile

    TExcelFile.SetCellValue(Integer, Integer, Integer, Integer, Integer)

    Sets the value on a cell.

    Remarks

    This method will enter the datatype of the object you pass to it. For example, if you set value="1" the string "1" will be entered on the cell. To convert a string to the best representation (on this case a number), use SetCellFromString(Integer, Integer, TRichString, Integer). To enter a HTML formatted string, use SetCellFromHtml(Integer, Integer, string, Integer)

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.SetCellValue(const sheet: Integer; const row: Integer; const col: Integer; const value: Integer; const XF: Integer); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const sheet Integer Sheet number, 1 based
    const row Integer Row, 1 based.
    const col Integer Column, 1 based.
    const value Integer Value to set.
    const XF Integer Format to Set. You normally get this number with AddFormat function. Use -1 to keep format unchanged.

    See also

    • TExcelFile
    In This Article
    Back to top FlexCel Studio for VCL and FireMonkey v7.24
    © 2002 - 2025 tmssoftware.com