|
FlexCel Studio for VCL/LCL
|
Converts a string to the best Excel datatype, and the enters it into a cell.
procedure SetCellString(Row: integer; Col: integer; const Text: UTF16String); overload;
__fastcall SetCellString(int Row, int Col, const UTF16String Text);
|
Parameters |
Description |
|
Row: integer |
Row for the cell. (1 based) |
|
Col: integer |
Column for the cell (1 based) |
|
const Text: UTF16String |
String with the value you want to enter. |
When using CellValue to set a cell value, you have to know the datatype you want to enter. That is, if you have a string s:="1/1/2002" and call CellValue[1,1]:=s; The cell A1 will end up with a string "1/1/2002" and not with a date. The same if you have a string holding a number.
SetCellString tries to solve this problem. When you call SetCellString(1,1,s) FlexCel will evaluate:
There is an overloaded version of this method, that lets you specify the original format you want for the cell.
|
Copyright (c) 2002-2008 TMS Software. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|