I wrote the following code piece:

var excel,worksheet: variant;
.
.
.
excel := CreateOleObject('Excel.Application');
excel.DisplayAlerts := false;
excel.Caption := 'Demonstrativo de Transferencias';
excel.Workbooks.add(1);
worksheet := excel.workbooks[1].worksheets[1];

Then I began to move values in character format to excel cells like below

excel.cells[1.1] := qryxxx.FieldByName('somecolumn').AsString;

and so on

When I move a string containing the value 699,5897(here the decimal point is comma) the value appears as 6.995.897 in the corresponding cell. When there is 2 digits after comma it seems that the value appears as showed in the string.

I suppose it is occurring 'cause the column format.

The question is: Is there a way to specify the format I wsh for the column when using these kind of objects?

Greetings from Sao Paulo - Brazil

Ricardo








excel