用tms的advstringgrid也可以实现
代码部分的话,弄个buttonclick
var
tof : boolean;
i : integer;
helpapp,helpbook
levariant;
row,column: Integer;
begin
try
helpapp:=createOleObject('Excel.Application');
helpbook:=createOleObject('Excel.sheet');
except
on exceptiondo
Raise Exception.Create('无法运行EXCEL!请确认是否安装!');
end;
helpapp.visible:=true;
helpbook:=helpapp.workbooks.add;
row:=1;
column:=1;
for i := 1 to tmpAsg.RowCount-1do
begin
tmpAsg.GetCheckBoxState(0,i,tof);
if tof then
begin
helpbook.worksheets[1].Cells[column,row] :=tmpAsg.Cells[xx,xx] //---自己补充----
inc(i);
end;
end;
Close;
end;