Kod: Tümünü seç
Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].AsFloat;
// Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].Value;
// if Col + 1 >= 4 then
// Sheet.Cells[Row, Col + 1].NumberFormat := '#,##0.0000';
// end;
//////////////////
if Col + 1 >= 4 then
begin
// Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].AsFloat;
Sheet.Cells[Row, Col + 1].NumberFormat := '#,##0.0000';
end
else
begin
Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].Value;
end;
End;
//////////////////
Next;
Inc(Row); // Row := Row + 1;
end;
---------------------------
Debugger Exception Notification
---------------------------
Project EMNTMENU.exe raised exception class EConvertError with message ''SAR-HAT GIDA MAD.TİC.VE NAK.' is not a valid floating point value'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
Bu şekilde de denediğim de ;
Kod: Tümünü seç
// Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].AsFloat;
// Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].Value;
// if Col + 1 >= 4 then
// Sheet.Cells[Row, Col + 1].NumberFormat := '#,##0.0000';
// end;
//////////////////
if Col + 1 >= 4 then
begin
Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].AsFloat;
Sheet.Cells[Row, Col + 1].NumberFormat := '#,##0.0000';
end
else
begin
Sheet.Cells[Row, Col + 1].Value := DBGrid1.Fields[Col].Value;
end;
End;
//////////////////
Next;
Inc(Row); // Row := Row + 1;
end;
Sheet.Cells[Row, 4].Formula := '=SUM(D3:D' + InttoStr(Row - 1) + ')';
---------------------------
Debugger Exception Notification
---------------------------
Project EMNTMENU.exe raised exception class EConvertError with message ''D00000000793008' is not a valid floating point value'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------