105
Excel.Cells[i,3] := 'Устройство';
Excel.Cells[i,4] := 'Дата размещения';
Excel.Cells[i,3].ColumnWidth := 50;
Excel.Cells[i,2].Font.Bold := True;
Excel.Cells[i,3].Font.Bold := True;
Excel.Cells[i,4].Font.Bold := True;
Inc(i);
DM.dstDevicesAtPlace.First;
//Цикл по устройствам на раб. месте:
while not DM.dstDevicesAtPlace.Eof do
begin
Excel.Cells[i,2] := FormatFloat('0000',
DM.dstDevicesAtPlace.FieldByName('ИнвN').AsInteger);
Excel.Cells[i,3] :=
DM.dstDevicesAtPlace.FieldByName('Устройство').AsString;
Excel.Cells[i,4] := DM.dstDevicesAtPlace.FieldByName('Дата').AsString;
DM.dstDevicesAtPlace.Next;
Inc(i);
end;
Inc(i, 2);
end;
DM.dstPlaces2.Next;
end; //while
DM.dstPlaces2.Close;
Excel.Application.EnableEvents := True;
Excel.Visible := True;