stify"> Sheet.Range ['A1: C1']. Style.HorizontalAlignment: = -4108;
Sheet.Range ['A1: C1']. Font.Bold: = true;
Sheet.Range ['A1: C1']. Value: = 'Додаток до диплома';
Sheet.Range ['A2: C2']. Merge;
Sheet.Range ['A2: C2']. Value: = ComboBox1.Text;
with DataModule2.qPrilDipl do begin
Parameters.ParamByName ('ПІБ'). Value: = ComboBox1.Text;
Active: = true;
First;
for i: = 4 to RecordCount +4-1 do begin
Sheet.Cells [i, 1]: = Fields [0]. AsString;
Sheet.Cells [i, 2]: = Fields [1]. AsString;
Sheet.Cells [i, 3]: = inttostr (round (Fields [2]. AsFloat));
Next;
end;
Active: = false;
end;
XL.Visible: = true;; TForm6.ComboBox2Select (Sender: TObject);
UpdateCombo;; TForm6.FormClose (Sender: TObject; var Action: TCloseAction);
DataModule2.tbStudent.Filtered: = false;;. Unit7;
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComObj, ExcelXP;
TForm7 = class (TForm)
Label1: TLabel;
ComboBox1: TComboBox;
Button1: TButton;
procedure FormShow (Sender: TObject);
procedure Button1Click (Sender: TObject);
end;
Form7: TForm7; Unit2, DB, ADODB;
{$ R *. dfm} TForm7.FormShow (Sender: TObject);
ComboBox1.Clear;
with DataModule2.tbGruppa do begin
First;
while not (eof) do begin
ComboBox1.Items.Add (FieldByName ('НГ'). AsString);
Next;
end;
end;
ComboBox1.ItemIndex: = 0;; TForm7.Button1Click (Sender: TObject);
var XL, Sheet, x: variant;
i, j: integer;
a: array of integer;
XL: = CreateOleObject ('Excel.Application');
XL.WorkBooks.Add;
Sheet: = XL.WorkBooks [1]. WorkSheets [1];
Sheet.Columns [1]. ColumnWidth: = 10;
Sheet.Columns [2]. ColumnWidth: = 40;
Sheet.Columns [3]. ColumnWidth: = 40;
Sheet.Cells [4, 1]: = 'Прізвище';
Sheet...